Skip to content

Commit 737a745

Browse files
committed
update changelog automatically when bump a new release
1 parent 4df77cb commit 737a745

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All releases of the BOSH CPI for Alibaba Cloud will be documented in this file.
55

66
IMPROVEMENTS
77

8+
- update changelog automatically when bump a new release ([#98](https://github.com/cloudfoundry-incubator/bosh-alicloud-cpi-release/pull/98))
89
- force delete instance and cleanup the network interface when deleting vm ([#97](https://github.com/cloudfoundry-incubator/bosh-alicloud-cpi-release/pull/97))
910
- update alibaba cloud go sdk to 1.60.132 and add the missing mock methods ([#96](https://github.com/cloudfoundry-incubator/bosh-alicloud-cpi-release/pull/96))
1011
- cleanup the left network interface after deleting the instance ([#95](https://github.com/cloudfoundry-incubator/bosh-alicloud-cpi-release/pull/95))

ci/tasks/promote-candidate.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ blobstore:
2727
secret_access_key: $ALICLOUD_ACCESS_KEY_SECRET
2828
EOF
2929

30+
# update the changelog
31+
changelog="CHANGELOG.md"
32+
line_num=`cat -n $changelog |grep "(Unreleased)"|awk '{print $1}'`
33+
bump_date=`env LANG=en_US.UTF-8 date '+%B %d, %Y'`
34+
sed -i -e "s/(Unreleased)/($bump_date)/" $changelog
35+
36+
arr=(${integer_version//./ })
37+
next_version="$((${arr[0]} + 1)).0.0"
38+
sed -i -e "${line_num}i \#\# $next_version (Unreleased)" $changelog
39+
3040
echo "finalizing CPI release..."
3141
bosh finalize-release ${dev_release} --version $integer_version --force
3242

@@ -37,5 +47,5 @@ EOF
3747

3848
git config --global user.email guimin.hgm@alibaba-inc.com
3949
git config --global user.name xiaozhu36
40-
git commit -m "New final release v $integer_version"
50+
git commit -m "Bump Alibaba Cloud cpi/$integer_version"
4151
popd

0 commit comments

Comments
 (0)