mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 16:02:04 +02:00
Name builds done outside of oliexdev differently
This commit is contained in:
23
.travis.yml
23
.travis.yml
@@ -1,6 +1,11 @@
|
|||||||
language: android
|
language: android
|
||||||
jdk: oraclejdk8
|
jdk: oraclejdk8
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- OWNER=${TRAVIS_REPO_SLUG%/*}
|
||||||
|
- DEV=${OWNER/oliexdev/dev}
|
||||||
|
|
||||||
android:
|
android:
|
||||||
components:
|
components:
|
||||||
- platform-tools
|
- platform-tools
|
||||||
@@ -11,7 +16,7 @@ android:
|
|||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- travis-dev-build
|
- /^travis-.*-build$/
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- yes | sdkmanager "platforms;android-27"
|
- yes | sdkmanager "platforms;android-27"
|
||||||
@@ -19,12 +24,12 @@ before_install:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sed -i -r
|
- sed -i -r
|
||||||
-e 's/applicationId "[^"]+/\0.dev/'
|
-e 's/applicationId "[^"]+/\0.'${DEV}'/'
|
||||||
-e 's/(versionCode ).*/\1'$(date +%s)'/'
|
-e 's/(versionCode ).*/\1'$(date +%s)'/'
|
||||||
-e 's/versionName "[^"]+/\0-dev_'${TRAVIS_COMMIT:0:8}_$(date +%F)'/'
|
-e 's/versionName "[^"]+/\0-'${DEV}'_'${TRAVIS_COMMIT:0:8}_$(date +%F)'/'
|
||||||
android_app/app/build.gradle
|
android_app/app/build.gradle
|
||||||
- sed -i -r
|
- sed -i -r
|
||||||
-e 's/(<string name="app_name"[^>]*>[^<]+)/\1 (dev)/'
|
-e 's/(<string name="app_name"[^>]*>[^<]+)/\1 ('${DEV}')/'
|
||||||
android_app/app/src/main/res/values/strings.xml
|
android_app/app/src/main/res/values/strings.xml
|
||||||
# Create keystore by running:
|
# Create keystore by running:
|
||||||
# keytool -genkey -v -keystore debug.keystore -storepass android \
|
# keytool -genkey -v -keystore debug.keystore -storepass android \
|
||||||
@@ -43,17 +48,17 @@ before_script:
|
|||||||
script: cd android_app && ./gradlew testDebug assembleAndroidTest assembleDebug
|
script: cd android_app && ./gradlew testDebug assembleAndroidTest assembleDebug
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- ln -s app/build/outputs/apk/debug/app-debug.apk openScale-dev-build.apk
|
- ln -s app/build/outputs/apk/debug/app-debug.apk openScale-${DEV}-build.apk
|
||||||
- git tag -f travis-dev-build
|
- git tag -f travis-${DEV}-build
|
||||||
- git remote add gh
|
- git remote add gh
|
||||||
https://${TRAVIS_REPO_SLUG%/*}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
|
https://${OWNER}:${GITHUB_API_KEY}@github.com/${TRAVIS_REPO_SLUG}.git
|
||||||
- git push -f gh travis-dev-build
|
- git push -f gh travis-${DEV}-build
|
||||||
- git remote remove gh
|
- git remote remove gh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api-key: $GITHUB_API_KEY
|
api-key: $GITHUB_API_KEY
|
||||||
file: openScale-dev-build.apk
|
file: openScale-${DEV}-build.apk
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
name: openScale development build
|
name: openScale development build
|
||||||
body: Automatic openScale development build of $TRAVIS_BRANCH
|
body: Automatic openScale development build of $TRAVIS_BRANCH
|
||||||
|
Reference in New Issue
Block a user