From 41ff73f39c4bc4adfee650e329f6c750493fc296 Mon Sep 17 00:00:00 2001 From: lydiasama Date: Thu, 9 Nov 2023 16:49:10 +0700 Subject: [PATCH 1/7] [#490] Add script for adding the release note --- codemagic.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/codemagic.yaml b/codemagic.yaml index 1e9de09bb..e84e85746 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -54,7 +54,7 @@ workflows: events: - push branch_patterns: - - pattern: develop + - pattern: 'develop' scripts: - *detekt_on_template_compose - *unit_test_on_template_compose @@ -62,6 +62,10 @@ workflows: working_directory: ./template-compose script: | ./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER + - name: Generating release notes with the latest git commit + script: | + RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))" + echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt artifacts: - *artifacts_template_compose - *artifacts_staging_apk @@ -81,7 +85,13 @@ workflows: events: - push branch_patterns: - - pattern: main + - pattern: 'main' + environment: + vars: + # Increase the clone depth to 50 to cover all commits from the latest tag + CM_CLONE_DEPTH: 50 + groups: + - firebase_credentials scripts: - *detekt_on_template_compose - *unit_test_on_template_compose @@ -89,6 +99,10 @@ workflows: working_directory: ./template-compose script: | ./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER + - name: Generating release notes with git commits from the latest tag + script: | + RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")" + echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt artifacts: - *artifacts_template_compose - *artifacts_production_apk From 3efdd7f4d6941ed133e9c9964b86288b06c5d21e Mon Sep 17 00:00:00 2001 From: lydiasama Date: Fri, 10 Nov 2023 11:12:50 +0700 Subject: [PATCH 2/7] [#490] Add script for adding the release note --- .cicdtemplate/.codemagic/codemagic.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.cicdtemplate/.codemagic/codemagic.yaml b/.cicdtemplate/.codemagic/codemagic.yaml index 1c26cbdb0..afcaf12d6 100644 --- a/.cicdtemplate/.codemagic/codemagic.yaml +++ b/.cicdtemplate/.codemagic/codemagic.yaml @@ -52,13 +52,17 @@ workflows: events: - push branch_patterns: - - pattern: develop + - pattern: 'develop' scripts: - *detekt - *unit_test - name: Build APK for staging script: | ./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER + - name: Generating release notes with the latest git commit + script: | + RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))" + echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt artifacts: - *artifacts_test_report - *artifacts_staging_apk @@ -78,13 +82,23 @@ workflows: events: - push branch_patterns: - - pattern: main + - pattern: 'main' + environment: + vars: + # Increase the clone depth to 50 to cover all commits from the latest tag + CM_CLONE_DEPTH: 50 + groups: + - firebase_credentials scripts: - *detekt - *unit_test - name: Build APK for production script: | ./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER + - name: Generating release notes with git commits from the latest tag + script: | + RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")" + echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt artifacts: - *artifacts_test_report - *artifacts_production_apk From 52e8e9f7d2b7b2abbd14b893f06aa42d88d7cb3d Mon Sep 17 00:00:00 2001 From: lydiasama Date: Fri, 10 Nov 2023 12:55:36 +0700 Subject: [PATCH 3/7] [#490] Update java version --- codemagic.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/codemagic.yaml b/codemagic.yaml index e84e85746..e678c0a2f 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -4,6 +4,7 @@ definitions: instance_type: mac_mini_m1 max_build_duration: 30 environment: + java: 17 groups: - firebase_credentials cache: From 216323f4980faa11a5430ea9babc3a266a3a3086 Mon Sep 17 00:00:00 2001 From: lydiasama Date: Fri, 10 Nov 2023 13:06:12 +0700 Subject: [PATCH 4/7] [#490] Update java version for production --- codemagic.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index e678c0a2f..d8b0024ef 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -4,9 +4,9 @@ definitions: instance_type: mac_mini_m1 max_build_duration: 30 environment: - java: 17 groups: - firebase_credentials + java: 17 cache: cache_paths: - $HOME/.gradle/caches @@ -93,6 +93,7 @@ workflows: CM_CLONE_DEPTH: 50 groups: - firebase_credentials + java: 17 scripts: - *detekt_on_template_compose - *unit_test_on_template_compose From 5ac451863d256d240b6fea240d8731721c8ec063 Mon Sep 17 00:00:00 2001 From: lydiasama Date: Fri, 10 Nov 2023 13:06:35 +0700 Subject: [PATCH 5/7] [#490] Update java version for template file --- .cicdtemplate/.codemagic/codemagic.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cicdtemplate/.codemagic/codemagic.yaml b/.cicdtemplate/.codemagic/codemagic.yaml index afcaf12d6..f12fa9d64 100644 --- a/.cicdtemplate/.codemagic/codemagic.yaml +++ b/.cicdtemplate/.codemagic/codemagic.yaml @@ -6,6 +6,7 @@ definitions: environment: groups: - firebase_credentials + java: 17 cache: cache_paths: - $HOME/.gradle/caches @@ -89,6 +90,7 @@ workflows: CM_CLONE_DEPTH: 50 groups: - firebase_credentials + java: 17 scripts: - *detekt - *unit_test From 922f7b9692f8ce3c57203dc5a1efef70d619693b Mon Sep 17 00:00:00 2001 From: "Runchana C. Jingjit" Date: Mon, 11 Mar 2024 15:20:41 +0700 Subject: [PATCH 6/7] [#490] Fix typo --- .cicdtemplate/.codemagic/codemagic.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cicdtemplate/.codemagic/codemagic.yaml b/.cicdtemplate/.codemagic/codemagic.yaml index f12fa9d64..5f4158a11 100644 --- a/.cicdtemplate/.codemagic/codemagic.yaml +++ b/.cicdtemplate/.codemagic/codemagic.yaml @@ -60,7 +60,7 @@ workflows: - name: Build APK for staging script: | ./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER - - name: Generating release notes with the latest git commit + - name: Generate release notes with the latest git commit script: | RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))" echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt From 449f9daac9e7154115ae6eec578d1369a84473bc Mon Sep 17 00:00:00 2001 From: lydiasama Date: Mon, 11 Mar 2024 18:27:18 +0700 Subject: [PATCH 7/7] [#490] Update step name --- .cicdtemplate/.codemagic/codemagic.yaml | 2 +- codemagic.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cicdtemplate/.codemagic/codemagic.yaml b/.cicdtemplate/.codemagic/codemagic.yaml index 5f4158a11..c21301bbc 100644 --- a/.cicdtemplate/.codemagic/codemagic.yaml +++ b/.cicdtemplate/.codemagic/codemagic.yaml @@ -97,7 +97,7 @@ workflows: - name: Build APK for production script: | ./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER - - name: Generating release notes with git commits from the latest tag + - name: Generate release notes with git commits from the latest tag script: | RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")" echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt diff --git a/codemagic.yaml b/codemagic.yaml index d8b0024ef..cf26e32ea 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -63,7 +63,7 @@ workflows: working_directory: ./template-compose script: | ./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER - - name: Generating release notes with the latest git commit + - name: Generate release notes with the latest git commit script: | RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))" echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt @@ -101,7 +101,7 @@ workflows: working_directory: ./template-compose script: | ./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER - - name: Generating release notes with git commits from the latest tag + - name: Generate release notes with git commits from the latest tag script: | RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")" echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt