2019-09-21 22:36:29 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Script to deploy to a prebuilt repo.
|
|
|
|
|
2019-10-29 02:57:47 +01:00
|
|
|
REPO_URL="https://stevesoltys:$GITHUB_API_KEY@github.com/stevesoltys/seedvault-prebuilt"
|
2019-09-21 22:36:29 +02:00
|
|
|
TAG=$(git tag -l --points-at HEAD)
|
|
|
|
|
|
|
|
git config --global user.email "github@stevesoltys.com"
|
|
|
|
git config --global user.name "Steve Soltys"
|
|
|
|
git clone --quiet $REPO_URL
|
|
|
|
|
2019-10-29 04:53:47 +01:00
|
|
|
cd seedvault-prebuilt
|
2019-09-21 22:36:29 +02:00
|
|
|
git checkout $TRAVIS_BRANCH || git checkout -b $TRAVIS_BRANCH
|
|
|
|
rm -Rf ./*
|
|
|
|
cp $TRAVIS_BUILD_DIR/Android.mk .
|
2019-10-29 04:53:47 +01:00
|
|
|
cp $TRAVIS_BUILD_DIR/app/build/outputs/apk/release/app-release-unsigned.apk ./Seedvault.apk
|
2019-10-29 02:57:47 +01:00
|
|
|
cp $TRAVIS_BUILD_DIR/permissions_com.stevesoltys.seedvault.xml .
|
|
|
|
cp $TRAVIS_BUILD_DIR/whitelist_com.stevesoltys.seedvault.xml .
|
2019-09-21 22:36:29 +02:00
|
|
|
|
|
|
|
git add .
|
2019-10-29 02:57:47 +01:00
|
|
|
git commit -m "Travis build $TRAVIS_BUILD_NUMBER" -m "https://github.com/stevesoltys/seedvault/commit/$TRAVIS_COMMIT"
|
2019-09-21 22:36:29 +02:00
|
|
|
git push origin $TRAVIS_BRANCH
|
|
|
|
|
|
|
|
if [ ! -z ${TAG} ]; then
|
|
|
|
git tag ${TAG}
|
|
|
|
git push origin --tags
|
|
|
|
fi
|