houqp commented on a change in pull request #1253:
URL: https://github.com/apache/arrow-datafusion/pull/1253#discussion_r744079133



##########
File path: dev/release/update_change_log.sh
##########
@@ -27,34 +27,42 @@
 # arrow-datafusion/.github_changelog_generator
 #
 # Usage:
-# CHANGELOG_GITHUB_TOKEN=<TOKEN> ./update_change_log.sh <PROJECT> <FROM_VER> 
<TO_VER>
+# CHANGELOG_GITHUB_TOKEN=<TOKEN> ./update_change_log.sh <PROJECT> 
<EXTRA_ARGS...>
 
 set -e
 
 SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 SOURCE_TOP_DIR="$(cd "${SOURCE_DIR}/../../" && pwd)"
 
-if [[ "$#" -ne 3 ]]; then
-    echo "USAGE: $0 PROJECT FROM_VER TO_VER"
+echo $1
+
+if [[ "$#" -lt 2 ]]; then
+    echo "USAGE: $0 PROJECT EXTRA_ARGS..."
     exit 1
 fi
 
 PROJECT=$1
-FROM_VER=$2
-TO_VER=$3
+shift
+
 OUTPUT_PATH="${PROJECT}/CHANGELOG.md"
 
 pushd ${SOURCE_TOP_DIR}
+
+# reset content in changelog
+git co "${OUTPUT_PATH}"
+# remove license header so github-changelog-generator has a clean base to 
append
+sed -i '1,18d' "${OUTPUT_PATH}"
+
 docker run -it --rm \
     -e CHANGELOG_GITHUB_TOKEN=$CHANGELOG_GITHUB_TOKEN \
     -v "$(pwd)":/usr/local/src/your-app \
-    githubchangeloggenerator/github-changelog-generator \
+    githubchangeloggenerator/github-changelog-generator:1.16.2 \
     --user apache \
     --project arrow-datafusion \
-    --since-tag "${FROM_VER}" \
     --include-labels "${PROJECT}" \
+    --base "${OUTPUT_PATH}" \

Review comment:
       this argument appends new version changelog to the existing one file 
instead of overwriting the full history.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to