Signed-off-by: Andrey Albershteyn <aalbersh@xxxxxxxxxx> --- release.sh | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/release.sh b/release.sh index c34efcbcdfcaf50a08853e65542e8f16214cfb4e..40ecfaff66c3e9f8d794e7543750bd9579b7c6c9 100755 --- a/release.sh +++ b/release.sh @@ -13,11 +13,13 @@ set -e KUP=0 COMMIT=1 +LAST_HEAD="" help() { echo "$(basename) - create xfsprogs release" printf "\t[--kup|-k] upload final tarball with KUP\n" printf "\t[--no-commit|-n] don't create release commit\n" + printf "\t[--last-head|-h] commit of the last release\n" } update_version() { @@ -48,6 +50,10 @@ while [ $# -gt 0 ]; do --no-commit|-n) COMMIT=0 ;; + --last-head|-h) + LAST_HEAD=$2 + shift + ;; --help|-h) help exit 0 @@ -122,7 +128,45 @@ if [ $KUP -eq 1 ]; then pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-${version}.tar.gz fi; +mail_file=$(mktemp) +subject="" +if [ -n "$LAST_HEAD" ]; then + subject="[ANNOUNCE] xfsprogs $(git describe --abbrev=0) released" + + cat << EOF > $mail_file +Hi folks, + +The xfsprogs repository at: + + git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git + +has just been updated. + +Patches often get missed, so if your outstanding patches are properly reviewed +on the list and not included in this update, please let me know. + +The for-next branch has also been updated to match the state of master. + +The new head of the master branch is commit: + +$(git log --oneline --format="%H" -1) + +New commits: + +$(git shortlog --format="[%h] %s" $LAST_HEAD..HEAD) + +Code Diffstat: + +$(git diff --stat --summary -C -M $LAST_HEAD..HEAD) +EOF +fi + echo "" -echo "Done. Please remember to push out tags and the branch." +echo "Done." +echo "Please remember to push out tags and the branch." printf "\tgit push origin v${version}\n" printf "\tgit push origin master\n" +if [ -n "$LAST_HEAD" ]; then + echo "Command to send ANNOUNCE email" + printf "\tneomutt linux-xfs@xxxxxxxxxxxxxxx -s \"$subject\" -i $mail_file\n" +fi -- 2.47.0