From 2869ea62ca81dcb41cf8e573f08aa6ce86b67032 Mon Sep 17 00:00:00 2001 From: marijn Date: Mon, 14 Oct 2024 16:10:46 +0200 Subject: [PATCH] Update release target --- CHANGELOG.md | 2 +- makefile | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d551a26..b5cd038 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Updated Makefile to continue the release process even when there are no changes to commit +- Updated Makefile to only add and commit CHANGELOG.md during release process if it has been changed ## [0.12.2] - 2024-10-11 diff --git a/makefile b/makefile index 7f8bf18..b3e9ced 100644 --- a/makefile +++ b/makefile @@ -38,8 +38,10 @@ release: documentation fi @NEW_VERSION=$$(python -m setuptools_scm --strip-dev) && \ sed -i '' "s/\[Unreleased\]/[$${NEW_VERSION}] - $$(date +%Y-%m-%d)/" CHANGELOG.md && \ - git add CHANGELOG.md && \ - git commit -m "Update CHANGELOG.md for version $${NEW_VERSION}" -f + if [ -n "$$(git status --porcelain CHANGELOG.md)" ]; then \ + git add CHANGELOG.md && \ + git commit -m "Update CHANGELOG.md for version $${NEW_VERSION}"; \ + fi git tag v$${NEW_VERSION} && \ git push origin main --tags docker_image: