From b0e6b290fff37704cee83f0a5b2886e0b791b1f5 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 9 Mar 2023 16:56:06 +0100 Subject: [PATCH] chore: allow no changelog diff when cutting a release --- scripts/rel/cut.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rel/cut.sh b/scripts/rel/cut.sh index dda99220a..0113aee5f 100755 --- a/scripts/rel/cut.sh +++ b/scripts/rel/cut.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash ## cut a new 5.x release for EMQX (opensource or enterprise). -set -x set -euo pipefail @@ -247,8 +246,9 @@ generate_changelog () { fi ./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'en' -v "$TAG" > "changes/${TAG}.en.md" ./scripts/rel/format-changelog.sh -b "${from_tag}" -l 'zh' -v "$TAG" > "changes/${TAG}.zh.md" - git add changes/"${TAG}".*.md - [ -n "$(git status -s)" ] && git commit -m "chore: Generate changelog for ${TAG}" + ## allow no diff in changelogs + git add changes/"${TAG}".*.md >/dev/null 2>&1 || true + [ -n "$(git status -s)" ] && git commit -m "docs: Generate changelog for ${TAG}" } if [ "$DRYRUN" = 'yes' ]; then