upload_native.sh 1.1 KB

12345678910111213141516171819202122
  1. #!/bin/bash
  2. 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
  6. echo " - Configuring GIT user"
  7. git config --global user.email "travis-ci"
  8. git config --global user.name "travis-ci"
  9. echo " - Decrypting private key"
  10. openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d
  11. chmod 600 "$HOME/.ssh/id_rsa"
  12. # ls jme3-bullet-native/build/libs/bulletjme/shared/
  13. # md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib
  14. echo " - Pushing natives onto branch $TRAVIS_BRANCH"
  15. git checkout "$TRAVIS_BRANCH"
  16. git add -v -- jme3-bullet-native/libs/native/
  17. git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
  18. git pull -q --rebase
  19. git push [email protected]:jMonkeyEngine/jmonkeyengine.git
  20. else
  21. echo No native changes.
  22. fi