1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-02-11 19:34:11 +01:00

Change app id and name for dev build

By making it possible to install it together with the released app
it becomes easier to switch between them.
This commit is contained in:
Erik Johansson 2018-01-02 23:06:09 +01:00
parent a230a82537
commit d7dc487060

View File

@ -14,14 +14,22 @@ branches:
- travis-dev-build
before_script:
- sed -i -re 's/(versionName ".*)"/\1-dev_'${TRAVIS_COMMIT:0:8}'"/' android_app/app/build.gradle
- sed -i -r
-e 's/applicationId "[^"]+/\0.dev/'
-e 's/(versionCode ).*/\1'$(date +%s)'/'
-e 's/versionName "[^"]+/\0-dev_'${TRAVIS_COMMIT:0:8}'/'
android_app/app/build.gradle
- sed -i -r
-e 's/(<string name="app_name">[^<]+)/\1 (dev)/'
android_app/app/src/main/res/values*/strings.xml
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 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
@ -31,7 +39,8 @@ deploy:
file: openScale-dev-build.apk
skip_cleanup: true
name: openScale development build
body: Automatic openScale development build of $TRAVIS_BRANCH ($TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
body: Automatic openScale development build of $TRAVIS_BRANCH
($TRAVIS_COMMIT) built by Travis CI on $(date +'%F %T %Z').
prerelease: true
overwrite: true
target_commitish: $TRAVIS_COMMIT