upload_native.sh: single commit per Travis CI job
This commit is contained in:
parent
4e56a6e24a
commit
814ab1b106
@ -4,60 +4,33 @@ set -euo pipefail
|
|||||||
# This shell script runs only during continuous integration at TravisCI.
|
# This shell script runs only during continuous integration at TravisCI.
|
||||||
# Its purpose is to commit native libraries to the project's GitHub repo.
|
# Its purpose is to commit native libraries to the project's GitHub repo.
|
||||||
|
|
||||||
function native_changes_common() {
|
echo " - Determine which native libraries changed, if any"
|
||||||
echo " - Configuring GIT user"
|
NATIVE_CHANGES_ANDROID="$(git diff --name-only -- jme3-android-native/libs jme3-bullet-native-android/libs)"
|
||||||
|
NATIVE_CHANGES_DESKTOP="$(git diff --name-only -- jme3-bullet-native/libs)"
|
||||||
|
|
||||||
|
if [ "$NATIVE_CHANGES_ANDROID$NATIVE_CHANGES_DESKTOP" != "" ]; then
|
||||||
|
echo " - Configure 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"
|
||||||
echo " - Decrypting private key"
|
echo " - Decrypt private key"
|
||||||
openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d
|
openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d
|
||||||
chmod 600 "$HOME/.ssh/id_rsa"
|
chmod 600 "$HOME/.ssh/id_rsa"
|
||||||
# ls jme3-bullet-native/build/libs/bulletjme/shared/
|
|
||||||
# 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 " - Checkout branch $TRAVIS_BRANCH"
|
||||||
git checkout "$TRAVIS_BRANCH"
|
git checkout "$TRAVIS_BRANCH"
|
||||||
}
|
echo " - Stage native libraries"
|
||||||
|
git add -v -- jme3-android-native/libs jme3-bullet-native/libs jme3-bullet-native-android/libs
|
||||||
echo " - Determine which native libraries changed, if any"
|
|
||||||
NATIVE_CHANGES_BULLET="$(git diff --name-only -- jme3-bullet-native/libs/native/)"
|
|
||||||
NATIVE_CHANGES_ANDROID_BULLET="$(git diff --name-only -- jme3-bullet-native-android/libs/)"
|
|
||||||
NATIVE_CHANGES_ANDROID_NATIVES="$(git diff --name-only -- jme3-android-native/libs/)"
|
|
||||||
|
|
||||||
if [ "$NATIVE_CHANGES_BULLET" != "" ]; then
|
|
||||||
echo " - Found changes in jme3-bullet-native"
|
|
||||||
native_changes_common
|
|
||||||
git add -v -- jme3-bullet-native/libs/native/
|
|
||||||
git status
|
git status
|
||||||
echo " - Commit changes in jme3-bullet-native"
|
echo " - Commit native libraries"
|
||||||
git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
|
if [ "$NATIVE_CHANGES_ANDROID" != "" ]; then
|
||||||
|
git commit -v -m "[ci skip] update android natives"
|
||||||
|
else
|
||||||
|
git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
|
||||||
|
fi
|
||||||
|
echo " - Rebase changes"
|
||||||
git pull -q --rebase
|
git pull -q --rebase
|
||||||
echo " - Push changes in jme3-bullet-native"
|
echo " - Push changes"
|
||||||
git push git@github.com:jMonkeyEngine/jmonkeyengine.git
|
git push git@github.com:jMonkeyEngine/jmonkeyengine.git
|
||||||
else
|
else
|
||||||
echo " - No changes in jme3-bullet-native"
|
echo " - No changes to native libraries"
|
||||||
fi
|
|
||||||
if [ "$NATIVE_CHANGES_ANDROID_BULLET" != "" ]; then
|
|
||||||
echo " - Found changes in jme3-bullet-native-android"
|
|
||||||
native_changes_common
|
|
||||||
git add -v -- jme3-bullet-native-android/libs/
|
|
||||||
git status
|
|
||||||
echo " - Commit changes in jme3-bullet-native-android"
|
|
||||||
git commit -v -m "[ci skip] android bullet: update natives"
|
|
||||||
git pull -q --rebase
|
|
||||||
echo " - Push changes in jme3-bullet-native-android"
|
|
||||||
git push git@github.com:jMonkeyEngine/jmonkeyengine.git
|
|
||||||
else
|
|
||||||
echo " - No changes in jme3-bullet-native-android"
|
|
||||||
fi
|
|
||||||
if [ "$NATIVE_CHANGES_ANDROID_NATIVES" != "" ]; then
|
|
||||||
echo " - Found changes in jme3-android-native"
|
|
||||||
native_changes_common
|
|
||||||
git add -v -- jme3-android-native/libs/
|
|
||||||
git status
|
|
||||||
echo " - Commmit changes in jme3-android-native"
|
|
||||||
git commit -v -m "[ci skip] android: update natives"
|
|
||||||
git pull -q --rebase
|
|
||||||
echo " - Push changes in jme3-android-native"
|
|
||||||
git push git@github.com:jMonkeyEngine/jmonkeyengine.git
|
|
||||||
else
|
|
||||||
echo " - No changes in jme3-android-native"
|
|
||||||
fi
|
fi
|
Loading…
x
Reference in New Issue
Block a user