diff options
author | Martin/Geno <geno+dev@fireorbit.de> | 2019-04-19 14:48:37 +0200 |
---|---|---|
committer | Martin/Geno <geno+dev@fireorbit.de> | 2019-04-19 17:11:21 +0200 |
commit | 1e18ace17261db029bbcfadefee7c5e581c82ea5 (patch) | |
tree | 07c3d48ac8f25e65eb03a1b181b1aeaab1700ed2 | |
parent | 05b57606a9750a04d386d2b538fc9dd7eb43276c (diff) |
F-Droid nightly ci-build / repo
-rw-r--r-- | .circleci/config.yml | 9 | ||||
-rw-r--r-- | .gitlab-ci.yml | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 32cef461d..4543b5a41 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,16 @@ jobs: key: android - run: export GRADLE_USER_HOME=$PWD/.gradle - run: echo y | sdkmanager "platforms;android-$(sed -n 's,.*compileSdkVersion\s*\([0-9][0-9]*\).*,\1,p' build.gradle)" > /dev/null + # workaround for fdroid nightly circleci bug + - run: sed -i "s/os.getenv('CIRCLE_REPOSITORY_URL')/\"https:\/\/github.com\/genofire\/Pix-Art-Messenger\"/" /usr/lib/python3/dist-packages/fdroidserver/nightly.py + # generate version number + - run: sed -i "s/^\(\s*versionCode\s*\).*$/\1$(git rev-list --first-parent --count HEAD)/" build.gradle + - run: sed -i "0,/versionName/s/^\(\s*versionName\).*/\1 \"$(printf '%s-%05d' $(git describe --tag --abbrev=0) $(git rev-list --first-parent --count HEAD))\"/" build.gradle + - run: cat -n build.gradle + # build - run: ./gradlew assembleStandard + # publish on nightly fdroid repo + - run: fdroid nightly - save_cache: paths: - ~/.android 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/ |