Steve Soltys | 710fcb4 | 2019-09-21 16:36:29 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Script to deploy to a prebuilt repo. |
| 4 | |
Steve Soltys | 32f558f | 2019-10-28 21:57:47 -0400 | [diff] [blame^] | 5 | REPO_URL="https://stevesoltys:$GITHUB_API_KEY@github.com/stevesoltys/seedvault-prebuilt" |
Steve Soltys | 710fcb4 | 2019-09-21 16:36:29 -0400 | [diff] [blame] | 6 | TAG=$(git tag -l --points-at HEAD) |
| 7 | |
| 8 | git config --global user.email "github@stevesoltys.com" |
| 9 | git config --global user.name "Steve Soltys" |
| 10 | git clone --quiet $REPO_URL |
| 11 | |
| 12 | cd backup-prebuilt |
| 13 | git checkout $TRAVIS_BRANCH || git checkout -b $TRAVIS_BRANCH |
| 14 | rm -Rf ./* |
| 15 | cp $TRAVIS_BUILD_DIR/Android.mk . |
| 16 | cp $TRAVIS_BUILD_DIR/app/build/outputs/apk/release/app-release-unsigned.apk ./Backup.apk |
Steve Soltys | 32f558f | 2019-10-28 21:57:47 -0400 | [diff] [blame^] | 17 | cp $TRAVIS_BUILD_DIR/permissions_com.stevesoltys.seedvault.xml . |
| 18 | cp $TRAVIS_BUILD_DIR/whitelist_com.stevesoltys.seedvault.xml . |
Steve Soltys | 710fcb4 | 2019-09-21 16:36:29 -0400 | [diff] [blame] | 19 | |
| 20 | git add . |
Steve Soltys | 32f558f | 2019-10-28 21:57:47 -0400 | [diff] [blame^] | 21 | git commit -m "Travis build $TRAVIS_BUILD_NUMBER" -m "https://github.com/stevesoltys/seedvault/commit/$TRAVIS_COMMIT" |
Steve Soltys | 710fcb4 | 2019-09-21 16:36:29 -0400 | [diff] [blame] | 22 | git push origin $TRAVIS_BRANCH |
| 23 | |
| 24 | if [ ! -z ${TAG} ]; then |
| 25 | git tag ${TAG} |
| 26 | git push origin --tags |
| 27 | fi |