aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9a4a3b3be..a0c9d8702 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,7 +19,17 @@ before_script:
build:
stage: build
script:
+ # generate version number
+ - export versionCode=`printf $(git rev-list --first-parent --count HEAD)`
+ - export versionName=`printf '%s-%05d' $(git describe --tag --abbrev=0) $versionCode`
+ - echo "set VersionCode '${versionCode}' and VersonName '${versionName}'"
+ - sed -i "s/^\(\s*versionCode\s*\).*$/\1$versionCode/" build.gradle
+ - sed -i "0,/versionName/s/^\(\s*versionName\).*/\1 \"$versionName\"/" build.gradle
+ - cat -n build.gradle
+ # build
- ./gradlew assembleStandard
+ # publish on nightly fdroid repo
+ - fdroid nightly
artifacts:
paths:
- build/outputs/