From f766c6df4b8e6969119ced255c6d417a9ebc0be0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Sat, 2 Mar 2024 22:02: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/65.txt |  1 +
 fastlane/metadata/android/fr-FR/changelogs/65.txt |  1 +
 pubspec.yaml                                      |  2 +-
 5 files changed, 7 insertions(+), 16 deletions(-)
 create mode 100644 fastlane/metadata/android/en-US/changelogs/65.txt
 create mode 100644 fastlane/metadata/android/fr-FR/changelogs/65.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 19420da..53b8918 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.1.15
-app.versionCode=64
+app.versionName=0.1.16
+app.versionCode=65
diff --git a/fastlane/metadata/android/en-US/changelogs/65.txt b/fastlane/metadata/android/en-US/changelogs/65.txt
new file mode 100644
index 0000000..c78c37f
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/65.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/65.txt b/fastlane/metadata/android/fr-FR/changelogs/65.txt
new file mode 100644
index 0000000..8ddc4d3
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/65.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 974982c..3194707 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
 name: sudoku
 description: A sudoku game application.
 publish_to: 'none'
-version: 0.1.15+64
+version: 0.1.16+65
 
 environment:
   sdk: '^3.0.0'
-- 
GitLab