From 019f8adc022ad15c88a0eebbd0a893b81f8afae0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Sat, 2 Mar 2024 21:57:37 +0100
Subject: [PATCH] Improve CI/CD, remove "update" step, disable "build-debug" in
 master branch

---
 .gitlab-ci.yml                                    | 15 ++-------------
 android/gradle.properties                         |  4 ++--
 fastlane/metadata/android/en-US/changelogs/61.txt |  1 +
 fastlane/metadata/android/fr-FR/changelogs/61.txt |  1 +
 pubspec.yaml                                      |  2 +-
 5 files changed, 7 insertions(+), 16 deletions(-)
 create mode 100644 fastlane/metadata/android/en-US/changelogs/61.txt
 create mode 100644 fastlane/metadata/android/fr-FR/changelogs/61.txt

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 69e9954..24c8063 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,25 +1,16 @@
 image: ghcr.io/cirruslabs/flutter:latest
 
 stages:
-  - update
   - build-debug
   - build-release
   - release
   - deploy
 
-update:
-  stage: update
-  except:
-    - tags
-  script:
-    - flutter packages get
-    - flutter packages upgrade
-  interruptible: true
-
 android:build-debug:
   stage: build-debug
   except:
     - tags
+    - master
   script:
     # Flutter local configuration
     - echo flutter.sdk=$FLUTTER_PATH > android/local.properties
@@ -49,8 +40,6 @@ android:build-release:
     - master
   except:
     - tags
-  dependencies:
-    - android:build-debug
   script:
     # Flutter local configuration
     - echo flutter.sdk=$FLUTTER_PATH > android/local.properties
@@ -121,4 +110,4 @@ android:deploy:
   dependencies:
     - application:release
   script:
-    - curl "${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}"
+    - curl "${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}" --fail
diff --git a/android/gradle.properties b/android/gradle.properties
index de553d4..bc12805 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,5 +1,5 @@
 org.gradle.jvmargs=-Xmx1536M
 android.useAndroidX=true
 android.enableJetifier=true
-app.versionName=0.0.60
-app.versionCode=60
+app.versionName=0.0.61
+app.versionCode=61
diff --git a/fastlane/metadata/android/en-US/changelogs/61.txt b/fastlane/metadata/android/en-US/changelogs/61.txt
new file mode 100644
index 0000000..c78c37f
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/61.txt
@@ -0,0 +1 @@
+Improve CI/CD, remove "update" step, disable "build-debug" in master branch.
diff --git a/fastlane/metadata/android/fr-FR/changelogs/61.txt b/fastlane/metadata/android/fr-FR/changelogs/61.txt
new file mode 100644
index 0000000..8ddc4d3
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/61.txt
@@ -0,0 +1 @@
+Amélioration de la CI/CD. Suppression de "update" et désactivation de "build-debug" sur master.
diff --git a/pubspec.yaml b/pubspec.yaml
index 2132c98..1d3230d 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
 name: puzzlegame
 description: A puzzle game application.
 publish_to: 'none'
-version: 0.0.60+60
+version: 0.0.61+61
 
 environment:
   sdk: '^3.0.0'
-- 
GitLab