Skip to content

Commit 2e88e1e

Browse files
committed
[#490] Add script for adding the release note
1 parent ffbfa73 commit 2e88e1e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

codemagic.yaml

+16-2
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,18 @@ workflows:
8787
events:
8888
- push
8989
branch_patterns:
90-
- pattern: develop
90+
- pattern: 'develop'
9191
scripts:
9292
- *detekt_on_template_compose
9393
- *unit_test_on_template_compose
9494
- name: Build APK for staging
9595
working_directory: ./template-compose
9696
script: |
9797
./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER
98+
- name: Generating release notes with the latest git commit
99+
script: |
100+
RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))"
101+
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
98102
artifacts:
99103
- *artifacts_template_compose
100104
- *artifacts_staging_apk
@@ -114,14 +118,24 @@ workflows:
114118
events:
115119
- push
116120
branch_patterns:
117-
- pattern: main
121+
- pattern: 'main'
122+
environment:
123+
vars:
124+
# Increase the clone depth to 50 to cover all commits from the latest tag
125+
CM_CLONE_DEPTH: 50
126+
groups:
127+
- firebase_credentials
118128
scripts:
119129
- *detekt_on_template_compose
120130
- *unit_test_on_template_compose
121131
- name: Build APK for production
122132
working_directory: ./template-compose
123133
script: |
124134
./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER
135+
- name: Generating release notes with git commits from the latest tag
136+
script: |
137+
RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")"
138+
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
125139
artifacts:
126140
- *artifacts_template_compose
127141
- *artifacts_production_apk

0 commit comments

Comments
 (0)