mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-26 09:44:31 +02:00
Merge pull request #121 from erijo/travis
Fix travis automatic build and deploy
This commit is contained in:
33
.travis.yml
33
.travis.yml
@@ -6,21 +6,34 @@ android:
|
||||
- platform-tools
|
||||
- tools
|
||||
- build-tools-26.0.2
|
||||
- android-24
|
||||
- android-26
|
||||
- extra-android-m2repository
|
||||
|
||||
branches:
|
||||
except:
|
||||
- travis-dev-build
|
||||
|
||||
before_script:
|
||||
- sed -i -re 's/(versionName ".*)"/\1-dev_'${TRAVIS_COMMIT:0:8}'"/' android_app/app/build.gradle
|
||||
|
||||
script: cd android_app && ./gradlew testDebug assembleDebug
|
||||
|
||||
before_deploy:
|
||||
- ln -s app/build/outputs/apk/debug/app-debug.apk openScale-dev-build.apk
|
||||
- git tag -f travis-dev-build
|
||||
- git remote add gh https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
- git push -f gh travis-dev-build
|
||||
- git remote remove gh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api-key: $GITHUB_API_KEY
|
||||
file: $HOME/openScale-dev-build.apk
|
||||
file: openScale-dev-build.apk
|
||||
skip_cleanup: true
|
||||
name: "openScale dev build"
|
||||
body: "Automatically openScale dev build by Travis CI"
|
||||
name: openScale development build
|
||||
body: Automatic openScale development build of $TRAVIS_BRANCH ($TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
|
||||
prerelease: true
|
||||
overwrite: true
|
||||
|
||||
after_success:
|
||||
- chmod +x ./upload_apk.sh
|
||||
- ./upload_apk.sh
|
||||
|
||||
script: cd android_app && ./gradlew testDebug assembleDebug
|
||||
target_commitish: $TRAVIS_COMMIT
|
||||
on:
|
||||
branch: master
|
||||
|
@@ -9,7 +9,7 @@ openScale is an open source app which support various Bluetooth scales to keep e
|
||||
<a href="https://play.google.com/store/apps/details?id=com.health.openscale" target="_blank">
|
||||
<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/></a>
|
||||
|
||||
Install [openScale-dev-build.apk](https://github.com/oliexdev/openScale/releases) to get the latest development build generated by [Travis CI](https://travis-ci.org/). But be aware that this version may contain bugs and you don't get any automatically updates.
|
||||
Install [openScale-dev-build.apk](https://github.com/oliexdev/openScale/releases/tag/travis-dev-build) to get the latest development build generated by [Travis CI](https://travis-ci.org/). But be aware that this version may contain bugs and you don't get any automatically updates.
|
||||
|
||||
# Features
|
||||
|
||||
|
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# copy apk file to home
|
||||
cp app/build/outputs/apk/debug/app-debug.apk $HOME/openScale-dev-build.apk
|
Reference in New Issue
Block a user