File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change 22set -e
33
44pushd ../
5+ # Creating the new tag and version code
6+ new_tag=" $1 "
7+ new_version_code=" $2 "
8+ github_token=" $3 "
59
10+ # Replacing the versions in the app/build.gradle.kts
11+ app_build_gradle=" app/build.gradle.kts"
12+ sed -i " s/versionCode = .*/versionCode = $new_version_code /" $app_build_gradle
13+ sed -i " s/versionName = .*/versionName = \" $new_tag \" /" $app_build_gradle
614
7- # Creating the new tag
8- new_tag=" $1 "
15+ # Writing to the Releases.md asset that's loaded inside the app, and the fastlane changelog
16+ tmp_file=" tmp_release.md"
17+ fastlane_file=" fastlane/metadata/android/en-US/changelogs/$new_version_code .txt"
18+ assets_releases=" app/src/main/assets/RELEASES.md"
19+ git cliff --unreleased --tag " $new_tag " --output $tmp_file --github-token " $github_token "
20+ prettier -w $tmp_file
921
10- # Writing to the Releases.md asset that's loaded inside the app
11- git cliff --unreleased --tag " $new_tag " --output app/src/main/assets/RELEASES.md
22+ cp $tmp_file $assets_releases
23+ cp $tmp_file $fastlane_file
24+ rm $tmp_file
1225
13- # Prepending to the RELEASES.md
26+ # Adding to RELEASES.md
1427git cliff --tag " $new_tag " --output RELEASES.md
15- prettier -w RELEASES.md app/src/main/assets/RELEASES.md
28+ prettier -w RELEASES.md
29+
30+ # Add them all to git
31+ git add $assets_releases $fastlane_file $app_build_gradle RELEASES.md
You can’t perform that action at this time.
0 commit comments