[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-cashier-terminal-android] 01/02: Add CI file for automatic nightl
From: |
gnunet |
Subject: |
[taler-cashier-terminal-android] 01/02: Add CI file for automatic nightly repo |
Date: |
Mon, 24 Feb 2020 19:38:05 +0100 |
This is an automated email from the git hooks/post-receive script.
torsten-grote pushed a commit to branch master
in repository cashier-terminal-android.
commit 2251966797e057703409662a99fcdc94cea7e2b3
Author: Torsten Grote <address@hidden>
AuthorDate: Mon Feb 24 09:20:37 2020 -0300
Add CI file for automatic nightly repo
---
.gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..edd6100
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,39 @@
+image: registry.gitlab.com/fdroid/ci-images-client:latest
+
+cache:
+ paths:
+ - .gradle/wrapper
+ - .gradle/caches
+
+stages:
+ - test
+ - deploy
+
+test:
+ stage: test
+ script: ./gradlew lint assembleRelease
+
+deploy_nightly:
+ stage: deploy
+ only:
+ - master
+ script:
+ # Ensure that key exists
+ - test -z "$DEBUG_KEYSTORE" && exit 0
+ # Rename nightly app
+ - sed -i
+ 's,<string name="app_name">.*</string>,<string name="app_name">Cashier
Nightly</string>,'
+ app/src/main/res/values*/strings.xml
+ # Set time-based version code
+ - export versionCode=$(date '+%s')
+ - sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," app/build.gradle
+ # Set nightly application ID
+ - sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1
\"net.taler.cashier.nightly\"," app/build.gradle
+ # Build the APK
+ - ./gradlew assembleDebug
+ - CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo"
CI_PROJECT_PATH="gnu-taler/fdroid-repo" fdroid nightly -v
+
+after_script:
+ # this file changes every time but should not be cached
+ - rm -f $GRADLE_USER_HOME/caches/modules-2/modules-2.lock
+ - rm -fr $GRADLE_USER_HOME/caches/*/plugin-resolution/
--
To stop receiving notification emails like this one, please contact
address@hidden.