Skip to content
Snippets Groups Projects
Commit 53748227 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Fix double build on create tag

parent 1e6a0e3b
No related branches found
No related tags found
1 merge request!5Resolve "Remove double build on create tag when releasing application"
Pipeline #1450 passed
...@@ -9,6 +9,8 @@ stages: ...@@ -9,6 +9,8 @@ stages:
update: update:
stage: update stage: update
except:
- tags
script: script:
- flutter packages get - flutter packages get
- flutter packages upgrade - flutter packages upgrade
...@@ -16,6 +18,8 @@ update: ...@@ -16,6 +18,8 @@ update:
android:build-debug: android:build-debug:
stage: build-debug stage: build-debug
except:
- tags
script: script:
# Flutter local configuration # Flutter local configuration
- echo flutter.sdk=$FLUTTER_PATH > android/local.properties - echo flutter.sdk=$FLUTTER_PATH > android/local.properties
...@@ -43,6 +47,8 @@ android:build-release: ...@@ -43,6 +47,8 @@ android:build-release:
stage: build-release stage: build-release
only: only:
- master - master
except:
- tags
dependencies: dependencies:
- android:build-debug - android:build-debug
script: script:
...@@ -86,7 +92,7 @@ application:release: ...@@ -86,7 +92,7 @@ application:release:
- VERSION_FILE="$(find . -name 'gradle.properties' | head -n1)" - VERSION_FILE="$(find . -name 'gradle.properties' | head -n1)"
- VERSION_NAME="$(grep '^app.versionName=' "${VERSION_FILE}" | cut -d'=' -f2)" - VERSION_NAME="$(grep '^app.versionName=' "${VERSION_FILE}" | cut -d'=' -f2)"
- VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)" - VERSION_CODE="$(grep '^app.versionCode=' "${VERSION_FILE}" | cut -d'=' -f2)"
- TAG_NAME="Release_${VERSION_CODE}_${VERSION_NAME}" - TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
- echo "${TAG_NAME}" - echo "${TAG_NAME}"
- git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})" - git tag -a "${TAG_NAME}" -m "Release ${VERSION_NAME} (${VERSION_CODE})"
- git push origin "${TAG_NAME}" - git push origin "${TAG_NAME}"
......
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=1.0.2 app.versionName=1.0.3
app.versionCode=3 app.versionCode=4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment