mirror of
https://github.com/oliexdev/openScale.git
synced 2025-02-11 19:34:11 +01:00
Give non-master builds a better tag name
This commit is contained in:
parent
e80c678598
commit
d2dac93f20
13
.travis.yml
13
.travis.yml
@ -6,6 +6,7 @@ env:
|
||||
- OWNER=${TRAVIS_REPO_SLUG%/*}
|
||||
- DEV=${OWNER/oliexdev/dev}
|
||||
- BRANCH=${TRAVIS_BRANCH/master/}
|
||||
- TAG=${DEV}${BRANCH:+_}${BRANCH}
|
||||
|
||||
android:
|
||||
components:
|
||||
@ -30,7 +31,7 @@ before_script:
|
||||
-e 's/versionName "[^"]+/\0-'${DEV}'_'${TRAVIS_COMMIT:0:8}_$(date +%F)'/'
|
||||
android_app/app/build.gradle
|
||||
- sed -i -r
|
||||
-e 's/(<string name="app_name"[^>]*>[^<]+)/\1 ('${DEV}${BRANCH}')/'
|
||||
-e 's/(<string name="app_name"[^>]*>[^<]+)/\1 ('${TAG}')/'
|
||||
android_app/app/src/main/res/values/strings.xml
|
||||
# Create keystore by running:
|
||||
# keytool -genkey -v -keystore debug.keystore -storepass android \
|
||||
@ -49,18 +50,18 @@ before_script:
|
||||
script: cd android_app && ./gradlew testDebug assembleAndroidTest assembleDebug
|
||||
|
||||
before_deploy:
|
||||
- ln -s app/build/outputs/apk/debug/app-debug.apk openScale-${DEV}${BRANCH}-build.apk
|
||||
- git tag -f travis-${DEV}${BRANCH}-build
|
||||
- ln -s app/build/outputs/apk/debug/app-debug.apk openScale-${TAG}-build.apk
|
||||
- git tag -f travis-${TAG}-build
|
||||
- git remote add gh
|
||||
https://${OWNER}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||
- git push gh :travis-${DEV}${BRANCH}-build || true
|
||||
- git push -f gh travis-${DEV}${BRANCH}-build
|
||||
- git push gh :travis-${TAG}-build || true
|
||||
- git push -f gh travis-${TAG}-build
|
||||
- git remote remove gh
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api-key: $GITHUB_API_KEY
|
||||
file: openScale-${DEV}${BRANCH}-build.apk
|
||||
file: openScale-${TAG}-build.apk
|
||||
skip_cleanup: true
|
||||
name: openScale development build (${TRAVIS_BRANCH})
|
||||
body: Automatic openScale development build of $TRAVIS_BRANCH
|
||||
|
Loading…
x
Reference in New Issue
Block a user