From 2a3ffd9914aa101388feff0075a7973dbe811135 Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Fri, 29 Mar 2019 19:09:11 +0100 Subject: [PATCH] fix travis fdroid deploy (for real) --- .travis.yml | 8 ++++---- tools/deploy-fdroid.sh | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 388027e..4ac6373 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,13 +24,13 @@ deploy: skip-cleanup: true github-token: $GITHUB_TOKEN keep-history: true - #on: - # tags: true + on: + tags: true local_dir: www # deploy android project for fdroid builds - provider: script script: bash tools/deploy-fdroid.sh skip-cleanup: true - #on: - # tags: true + on: + tags: true diff --git a/tools/deploy-fdroid.sh b/tools/deploy-fdroid.sh index 5bd60f5..864793b 100644 --- a/tools/deploy-fdroid.sh +++ b/tools/deploy-fdroid.sh @@ -1,15 +1,16 @@ #!/bin/bash -# expects travis env vars: $repo, $tag, $rev, $GITHUB_TOKEN +# expects travis env vars: $TRAVIS_TAG, $GITHUB_TOKEN +rev=$(git rev-parse --short HEAD) target=https://$GITHUB_TOKEN@github.com/sensebox/blockly-app.git branch=fdroid git clone --depth=1 -b $branch $target fdroid rm -rf fdroid/* -mv -f platforms/android fdroid/ +mv -f platforms/android/* fdroid/ cd fdroid git config user.name "Travis-CI" git config user.email "travis@travis-ci.org" git add -f --ignore-errors . -git commit -m "android project for $tag at $rev" --amend # dont add new commits to avoid increasing repo size +git commit -m "android project for $TRAVIS_TAG at $rev" --amend # dont add new commits to avoid increasing repo size git push -f $target $branch > /dev/null 2>&1 # hide output to not leak GITHUB_TOKEN in logs