Skip to content

Commit 21d0854

Browse files
committed
Continuous Integration: Also upload natives from bullet-native-android and android (jMonkeyEngine#1171)
1 parent c461a1b commit 21d0854

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

private/upload_native.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
set -euo pipefail
3-
echo " - Checking if natives changed in commit $TRAVIS_COMMIT.."
4-
NATIVE_CHANGES="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)"
5-
if [ "$NATIVE_CHANGES" != "" ]; then
3+
4+
function native_changes_common() {
65
echo " - Configuring GIT user"
76
git config --global user.email "travis-ci"
87
git config --global user.name "travis-ci"
@@ -13,10 +12,31 @@ if [ "$NATIVE_CHANGES" != "" ]; then
1312
# md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib
1413
echo " - Pushing natives onto branch $TRAVIS_BRANCH"
1514
git checkout "$TRAVIS_BRANCH"
15+
}
16+
17+
echo " - Checking if natives changed in commit $TRAVIS_COMMIT.."
18+
NATIVE_CHANGES_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)"
19+
NATIVE_CHANGES_ANDROID_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native-android/)"
20+
NATIVE_CHANGES_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-android-native/)"
21+
22+
if [ "$NATIVE_CHANGES_BULLET" != "" ]; then
23+
native_changes_common
1624
git add -v -- jme3-bullet-native/libs/native/
1725
git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
1826
git pull -q --rebase
1927
git push [email protected]:jMonkeyEngine/jmonkeyengine.git
28+
elif [ "$NATIVE_CHANGES_ANDROID_BULLET" != "" ]; then
29+
native_changes_common
30+
git add -v -- jme3-bullet-native-android/libs/
31+
git commit -v -m "[ci skip] android bullet: update natives"
32+
git pull -q --rebase
33+
git push [email protected]:jMonkeyEngine/jmonkeyengine.git
34+
elif [ "$NATIVE_CHANGES_ANDROID_NATIVES" != "" ]; then
35+
native_changes_common
36+
git add -v -- jme3-android-native/libs/
37+
git commit -v -m "[ci skip] android: update natives"
38+
git pull -q --rebase
39+
git push [email protected]:jMonkeyEngine/jmonkeyengine.git
2040
else
2141
echo No native changes.
2242
fi

0 commit comments

Comments
 (0)