From 9bba9b47c71603d81debf882b751e401cede9c98 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 9 Mar 2023 17:00:30 +0100 Subject: [PATCH] chore: allow untracked files to exist when cutting release --- scripts/rel/cut.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/rel/cut.sh b/scripts/rel/cut.sh index 0113aee5f..ed94dc466 100755 --- a/scripts/rel/cut.sh +++ b/scripts/rel/cut.sh @@ -246,9 +246,12 @@ 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" - ## 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 [ -n "$(git diff --stat)" ]; then + git add changes/"${TAG}".*.md + git commit -m "docs: Generate changelog for ${TAG}" + else + logmsg "No changelog update." + fi } if [ "$DRYRUN" = 'yes' ]; then