upload_native.sh 1.2 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -euo pipefail
  3. echo " - Checking if natives changed in commit $TRAVIS_COMMIT.."
  4. git status -v
  5. NATIVE_CHANGES="$(git diff-tree --name-only "$TRAVIS_COMMIT" -- jme3-bullet-native/)"
  6. git status -v
  7. git log -n 2
  8. if [ "$NATIVE_CHANGES" != "" ]; then
  9. echo " - Configuring GIT user"
  10. git config --global user.email "travis-ci"
  11. git config --global user.name "travis-ci"
  12. echo " - Decrypting private key"
  13. openssl aes-256-cbc -K $encrypted_f0a0b284e2e8_key -iv $encrypted_f0a0b284e2e8_iv -in private/key.enc -out "$HOME/.ssh/id_rsa" -d
  14. chmod 600 "$HOME/.ssh/id_rsa"
  15. git status -v
  16. ls -lsh jme3-bullet-native/build/libs/bulletjme/shared/
  17. # md5 -r jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib jme3-bullet-native/build/libs/bulletjme/shared/mac32/libbulletjme.dylib
  18. echo " - Pushing natives onto branch $TRAVIS_BRANCH"
  19. git checkout "$TRAVIS_BRANCH"
  20. git status -v
  21. git add -v -- jme3-bullet-native/libs/native/
  22. git status -v
  23. git commit -v -m "[ci skip] bullet: update $TRAVIS_OS_NAME natives"
  24. git status -v
  25. git pull -q --rebase
  26. git status -v
  27. #git push [email protected]:jMonkeyEngine/jmonkeyengine.git
  28. else
  29. echo No native changes.
  30. fi