Verified Commit a5cc2452 authored by genofire's avatar genofire Committed by genofire
Browse files

gitlab-ci with fdroid nightly support

parent 06128339
Pipeline #1834 passed with stage
in 1 minute and 47 seconds
......@@ -15,12 +15,33 @@ before_script:
build:
stage: build
except:
- develop
script:
- ./gradlew assemble
artifacts:
paths:
- app/build/outputs/
publish:
stage: build
only:
- develop
script:
# workaround for deploy release in fdroid nightly
- sed -i "s/-debug.apk/-unsigned.apk/" /usr/lib/python3/dist-packages/fdroidserver/nightly.py
# generate new version
- export versionCode="$CI_JOB_ID"
- export versionName="$(git describe --tag --abbrev=0)-${CI_JOB_ID}_${CI_COMMIT_REF_NAME}"
- 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 free version
- ./gradlew assemble
# publish on nightly 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment