Explorar o código

chore: do not auto generate changelog for ce

Zaiming (Stone) Shi %!s(int64=2) %!d(string=hai) anos
pai
achega
eb4a2ad4d5
Modificáronse 2 ficheiros con 3 adicións e 25 borrados
  1. 2 23
      scripts/rel/cut.sh
  2. 1 2
      scripts/rel/format-changelog.sh

+ 2 - 23
scripts/rel/cut.sh

@@ -233,32 +233,11 @@ if [ -d "${CHECKS_DIR}" ]; then
     done
 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() {
     local file="changes/${TAG}.en.md"
     if [ ! -f  "$file" ]; then
         logerr "Changelog file $file is missing."
+        logerr "Generate it with command: ./scripts/rel/format-changelog.sh -b ${PREV_TAG} -v ${TAG} > ${file}"
         exit 1
     fi
 }
@@ -280,7 +259,7 @@ else
             check_changelog
             ;;
         v*)
-            generate_changelog
+            check_changelog
             ;;
     esac
     git tag "$TAG"

+ 1 - 2
scripts/rel/format-changelog.sh

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