summaryrefslogtreecommitdiffhomepage
path: root/desktop/scripts
diff options
context:
space:
mode:
authorOskar <oskar@mullvad.net>2025-01-31 11:31:46 +0100
committerOskar <oskar@mullvad.net>2025-02-04 13:06:23 +0100
commit2a9baa92859d08f4e72975b567dc228b2ec8fecb (patch)
treedff913b0efe6e401b56a0a4ba2a0b5f58e8ee35f /desktop/scripts
parent77018b20613acc923d3a4c66236dac08c8211bdf (diff)
downloadmullvadvpn-2a9baa92859d08f4e72975b567dc228b2ec8fecb.tar.xz
mullvadvpn-2a9baa92859d08f4e72975b567dc228b2ec8fecb.zip
Update changelog automatically when doing release
Diffstat (limited to 'desktop/scripts')
-rwxr-xr-xdesktop/scripts/prepare-release.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/desktop/scripts/prepare-release.sh b/desktop/scripts/prepare-release.sh
index a0dbe55805..d54ce9d13c 100755
--- a/desktop/scripts/prepare-release.sh
+++ b/desktop/scripts/prepare-release.sh
@@ -44,12 +44,16 @@ function checks {
log_error "It looks like you did not update $changes_path"
exit 1
fi
+}
- if [[ $(grep "^## \\[$PRODUCT_VERSION\\] - " $changelog_path) == "" ]]; then
- log_error "It looks like you did not add $PRODUCT_VERSION to the changelog?"
- log_error "Please make sure the changelog is up to date and correct before you proceed."
- exit 1
- fi
+function update_changelog {
+ sed -i -e "/^## \[Unreleased\]/a \\\n\\n## \[$PRODUCT_VERSION\] - $(date +%F)" $changelog_path
+
+ log_info "\nPaused after editing changelog. Make potential edits, then press any key to continue..."
+ read -r -s -n 1
+
+ git commit -S -m "Update desktop app changelog with $PRODUCT_VERSION section" \
+ $changelog_path
}
function update_product_version {
@@ -64,6 +68,7 @@ function create_tag {
}
checks
+update_changelog
update_product_version
create_tag