Skip to content

Commit

Permalink
Update release.sh script to create default changelogs for f-droid
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Feb 9, 2023
1 parent ac77ee2 commit 6d89169
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,25 @@ do-versionfile() {
git add VERSION
}

# Update a version file that can be parsed by third-parties, e.g. F-Droid
do-fastlane-changelog() {
CHANGELOGS_DIR="fastlane/metadata/android/en-US/changelogs"
NEW_CHANGELOG="$CHANGELOGS_DIR/$V_CODE.txt"

[ -f "$NEW_CHANGELOG" ] && return

echo -e "\n${S_NOTICE}Creating new default fastlane changelog file for $V_CODE...\n"

cp "$CHANGELOGS_DIR/default.txt" "$NEW_CHANGELOG"

cat "$NEW_CHANGELOG"

echo -e "\n\n${I_OK} ${S_NOTICE}${ACTION_MSG} [${S_NORM}$NEW_CHANGELOG${S_NOTICE}] file"

# Stage file for commit
git add "$CHANGELOGS_DIR/$V_CODE.txt"
}

# Does the release branch already exist?
check-branch-exist() {
[ "$FLAG_NOBRANCH" = true ] && return
Expand Down Expand Up @@ -448,6 +467,7 @@ echo -e "\n${S_LIGHT}––––––"
# Update steps
do-version-properties
do-versionfile
do-fastlane-changelog
do-branch
do-commit
create-tag "${V_NAME}" "${REL_NOTE}"
Expand Down

0 comments on commit 6d89169

Please sign in to comment.