|
@@ -1,8 +1,7 @@
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
set -euo pipefail
|
|
-echo " - Checking if natives changed in commit $TRAVIS_COMMIT.."
|
|
|
|
-NATIVE_CHANGES="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)"
|
|
|
|
-if [ "$NATIVE_CHANGES" != "" ]; then
|
|
|
|
|
|
+
|
|
|
|
+function native_changes_common() {
|
|
echo " - Configuring GIT user"
|
|
echo " - Configuring GIT user"
|
|
git config --global user.email "travis-ci"
|
|
git config --global user.email "travis-ci"
|
|
git config --global user.name "travis-ci"
|
|
git config --global user.name "travis-ci"
|
|
@@ -13,10 +12,31 @@ if [ "$NATIVE_CHANGES" != "" ]; then
|
|
# md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib
|
|
# md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib
|
|
echo " - Pushing natives onto branch $TRAVIS_BRANCH"
|
|
echo " - Pushing natives onto branch $TRAVIS_BRANCH"
|
|
git checkout "$TRAVIS_BRANCH"
|
|
git checkout "$TRAVIS_BRANCH"
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+echo " - Checking if natives changed in commit $TRAVIS_COMMIT.."
|
|
|
|
+NATIVE_CHANGES_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)"
|
|
|
|
+NATIVE_CHANGES_ANDROID_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native-android/)"
|
|
|
|
+NATIVE_CHANGES_BULLET="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-android-native/)"
|
|
|
|
+
|
|
|
|
+if [ "$NATIVE_CHANGES_BULLET" != "" ]; then
|
|
|
|
+ native_changes_common
|
|
git add -v -- jme3-bullet-native/libs/native/
|
|
git add -v -- jme3-bullet-native/libs/native/
|
|
git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
|
|
git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
|
|
git pull -q --rebase
|
|
git pull -q --rebase
|
|
git push [email protected]:jMonkeyEngine/jmonkeyengine.git
|
|
git push [email protected]:jMonkeyEngine/jmonkeyengine.git
|
|
|
|
+elif [ "$NATIVE_CHANGES_ANDROID_BULLET" != "" ]; then
|
|
|
|
+ native_changes_common
|
|
|
|
+ git add -v -- jme3-bullet-native-android/libs/
|
|
|
|
+ git commit -v -m "[ci skip] android bullet: update natives"
|
|
|
|
+ git pull -q --rebase
|
|
|
|
+ git push [email protected]:jMonkeyEngine/jmonkeyengine.git
|
|
|
|
+elif [ "$NATIVE_CHANGES_ANDROID_NATIVES" != "" ]; then
|
|
|
|
+ native_changes_common
|
|
|
|
+ git add -v -- jme3-android-native/libs/
|
|
|
|
+ git commit -v -m "[ci skip] android: update natives"
|
|
|
|
+ git pull -q --rebase
|
|
|
|
+ git push [email protected]:jMonkeyEngine/jmonkeyengine.git
|
|
else
|
|
else
|
|
echo No native changes.
|
|
echo No native changes.
|
|
fi
|
|
fi
|