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