From 2b240709fc60bd6f32b2f317fcad14e640aeb61c Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Wed, 6 Jul 2022 11:14:03 +0000 Subject: [PATCH] Improve release script --- changes/template.rst | 2 +- dist/create-release.sh | 11 ++++------- towncrier.toml | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/changes/template.rst b/changes/template.rst index cadfdef..be37518 100644 --- a/changes/template.rst +++ b/changes/template.rst @@ -1,4 +1,4 @@ - +{{ versiondata.version }} ({{ versiondata.date }}) {% for section, _ in sections.items() %} {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} diff --git a/dist/create-release.sh b/dist/create-release.sh index c3c11a2..6e11872 100755 --- a/dist/create-release.sh +++ b/dist/create-release.sh @@ -69,11 +69,7 @@ if [ "$(git tag -l | grep -e "^$TAG$")" != '' ]; then fi echo "Compiling the changelog..." -towncrier build --version="$TAG" - -# Manually fixing the release date in the changelog, -# as towncrier's --date param doesn't seem to work -sed -i '' "s/$TAG (unreleased)/$TAG ($(date +"%Y-%m-%d"))/g" CHANGELOG +towncrier build --version="$TAG" --date $(date +"%Y-%m-%d") --yes git add CHANGELOG git commit --message "Update changelog for version $TAG" @@ -84,9 +80,10 @@ versionName = $TAG" > fdroidversion.txt git add fdroidversion.txt git commit --message "Update version information for F-Droid" -git push - # Create and push tag +# Push tag first to make sure the Tag Pipeline runs echo "Tagging the application..." git tag -a -s -m "$MESSAGE" "$TAG" git push --tags + +git push diff --git a/towncrier.toml b/towncrier.toml index 68682d2..f1aaa14 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -6,7 +6,7 @@ start_string = ".. towncrier\n" template = "changes/template.rst" issue_format = "" - title_format = "{version} (unreleased)" + title_format = false underlines = "-" [[tool.towncrier.section]]