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

Merge branch '8-remove-double-build-on-create-tag-when-releasing-application' into 'master'

Resolve "Remove double build on create tag when releasing application"

Closes #8

See merge request !5
parents 1e6a0e3b 53748227
No related branches found
No related tags found
1 merge request!5Resolve "Remove double build on create tag when releasing application"
Pipeline #1495 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