Skip to content
Snippets Groups Projects
Commit 8d10b948 authored by Jonas Broeckmann's avatar Jonas Broeckmann
Browse files

Adjusted app version

parent 8c7880ca
No related branches found
No related tags found
No related merge requests found
Pipeline #1270877 passed
......@@ -11,7 +11,7 @@ image: eclipse-temurin:17-jdk-jammy
variables:
APP_VERSION: "1.0.2"
APP_VERSION: "1.0.3"
APP_APK: "kaffeekasse-${APP_VERSION}.apk"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/kaffeekasse/${APP_VERSION}"
......@@ -119,6 +119,11 @@ createPackage:
- if: $CI_COMMIT_TAG
before_script: []
script:
- |
if [ "v$APP_VERSION" != "$CI_COMMIT_TAG" ]; then
echo "APP_VERSION does not match the tag"
exit 1
fi
- cp app/build/outputs/apk/release/app-release.apk $APP_APK
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $APP_APK "${PACKAGE_REGISTRY_URL}/${APP_APK}"
......
......@@ -15,7 +15,14 @@ android {
minSdk = 29
targetSdk = 34
versionCode = 1
versionName = "1.0.2"
versionName = "1.0.3"
System.getenv()["APP_VERSION"]?.let { versionFromEnv ->
require(versionFromEnv == versionName) {
"Version in environment ($versionFromEnv) does not match version in build.gradle.kts ($versionName)"
}
println("Version matches environment: $versionName")
}
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment