Skip to content

Commit

Permalink
Update changelog.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhoublue authored Oct 28, 2024
1 parent 1db5ac8 commit 4fb2881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/scripts/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cd ${PROJECT_ROOT_PATH}

#============================
echo "-------------- generate latest release version tag --------------"
LATEST_RELEASE_VERISON=$(curl --retry 10 -s https://api.github.com/repos/spidernet-io/spiderpool/releases | grep '"tag_name":' | grep -Eo "v([0-9]+\.[0-9]+\.[0-9])" | sort -r | head -n 1)
LATEST_RELEASE_VERISON=$(curl --retry 10 -s https://api.github.com/repos/$(git remote get-url origin | sed -E 's/.*github.com[:\/]([^\/]+\/[^\/]+).git/\1/')/releases | grep '"tag_name":' | grep -Eo "v([0-9]+\.[0-9]+\.[0-9])" | sort -r | head -n 1) || true
LATEST_RELEASE_VERISON=` grep -oE "[0-9]+\.[0-9]+\.[0-9]+" <<< "${LATEST_RELEASE_VERISON}" ` || true
if [ -z "${LATEST_RELEASE_VERISON}" ] ; then
LATEST_X=0
Expand Down Expand Up @@ -175,7 +175,7 @@ echo "generate changelog md"
FILE_CHANGELOG="${OUTPUT_DIR}/changelog_from_${START_TAG}_to_${DEST_TAG}.md"
echo > ${FILE_CHANGELOG}
echo "# ${DEST_TAG}" >> ${FILE_CHANGELOG}
echo "Welcome to the ${DEST_TAG} release of Spiderpool!" >> ${FILE_CHANGELOG}
echo "Welcome to the ${DEST_TAG} release" >> ${FILE_CHANGELOG}
echo "Compared with version:${START_TAG}, version:${DEST_TAG} has the following updates." >> ${FILE_CHANGELOG}
echo "" >> ${FILE_CHANGELOG}
echo "***" >> ${FILE_CHANGELOG}
Expand Down

0 comments on commit 4fb2881

Please sign in to comment.