add travis deploy task for fdroid #5
pushes build result of platforms/android to `fdroid` branch, so fdroid can build using a standard gradle project. TODO: re-enable `on: tags` build option after testingios
parent
2ab13932d3
commit
7296135b56
@ -1,22 +1,28 @@
|
|||||||
language: node_js
|
language: android
|
||||||
node_js:
|
node_js:
|
||||||
- "8"
|
- "8"
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- npm install
|
- npm install
|
||||||
|
- npm install -g ionic cordova
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm run build
|
- npm run build
|
||||||
|
- npm run android:build
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pages
|
# deploy web build to gh-pages branch
|
||||||
skip-cleanup: true
|
- provider: pages
|
||||||
github-token: $GITHUB_TOKEN
|
skip-cleanup: true
|
||||||
keep-history: true
|
github-token: $GITHUB_TOKEN
|
||||||
on:
|
keep-history: true
|
||||||
tags: true
|
#on:
|
||||||
local_dir: www
|
# 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
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# expects travis env vars: $repo, $tag, $rev, $GITHUB_TOKEN
|
||||||
|
|
||||||
|
target=https://$GITHUB_TOKEN@github.com/sensebox/blockly-app.git
|
||||||
|
branch=fdroid
|
||||||
|
|
||||||
|
git clone --depth=1 -b $target $repo fdroid
|
||||||
|
rm -rf 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 push -f $target $branch > /dev/null 2>&1 # hide output to not leak GITHUB_TOKEN in logs
|
Loading…
Reference in New Issue