On 2025-01-16 14:41:48, Darrick J. Wong wrote: > On Fri, Jan 10, 2025 at 12:05:09PM +0100, Andrey Albershteyn wrote: > > 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 > > Looks pretty similar to my git-announce tool. ;) > > > + > > 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" > > Note: if you put the headers in $mail_file, like this: > > cat << EOF > $mail_file > To: linux-xfs@xxxxxxxxxxxxxxx > Subject: $subject > > Hi folks, > ... > ENDL > > then you can do: > > neomutt -H $mail_file Neat, will update this > > to edit the message and send it out. I also wonder if you'd like a copy > of my git-contributors script that spits out a list of emails to cc > based on the git diff? sure, is it small enough to be a part of this file? -- - Andrey