chore: do not auto generate changelog for ce

This commit is contained in:
Zaiming (Stone) Shi 2023-09-29 14:10:24 +02:00
parent f69702b82e
commit eb4a2ad4d5
2 changed files with 3 additions and 25 deletions

View File

@ -233,32 +233,11 @@ if [ -d "${CHECKS_DIR}" ]; then
done done
fi fi
generate_changelog () {
local from_tag
from_tag="${PREV_TAG:-}"
if [[ -z $from_tag ]]; then
from_tag="$(./scripts/find-prev-rel-tag.sh "$PROFILE")"
fi
# num_en=$(git diff --name-only -a "${from_tag}...HEAD" "changes" | grep -c '.en.md')
# num_zh=$(git diff --name-only -a "${from_tag}...HEAD" "changes" | grep -c '.zh.md')
# if [ "$num_en" -ne "$num_zh" ]; then
# echo "Number of English and Chinese changelog files added since ${from_tag} do not match."
# exit 1
# 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
if [ -n "$(git diff --staged --stat)" ]; then
git commit -m "docs: Generate changelog for ${TAG}"
else
logmsg "No changelog update."
fi
}
check_changelog() { check_changelog() {
local file="changes/${TAG}.en.md" local file="changes/${TAG}.en.md"
if [ ! -f "$file" ]; then if [ ! -f "$file" ]; then
logerr "Changelog file $file is missing." logerr "Changelog file $file is missing."
logerr "Generate it with command: ./scripts/rel/format-changelog.sh -b ${PREV_TAG} -v ${TAG} > ${file}"
exit 1 exit 1
fi fi
} }
@ -280,7 +259,7 @@ else
check_changelog check_changelog
;; ;;
v*) v*)
generate_changelog check_changelog
;; ;;
esac esac
git tag "$TAG" git tag "$TAG"

View File

@ -57,8 +57,7 @@ case "${LANGUAGE:-}" in
true true
;; ;;
*) *)
logerr "-l|--lang must be 'en' or 'zh'" LANGUAGE='en'
exit 1
;; ;;
esac esac