[PATCH v4 08/10] release.sh: add -f to generate for-next update email

Andrey Albershteyn
2025-02-13T20:16:09Z

Add --for-next/-f to generate ANNOUNCE email for for-next branch
update. This doesn't require new commit/tarball/tags, so skip it.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
release.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/release.sh b/release.sh
index 696d3ec107ca0cc11ed565734ca7423acfd6d858..b7461e958e6f55f7b8ccf31b53e2d304db11789e 100755
--- a/release.sh
+++ b/release.sh
@@ -14,12 +14,14 @@ set -e
KUP=0
COMMIT=1
LAST_HEAD=""
+FOR_NEXT=0

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|-l] commit of the last release\n"
+ printf "\t[--for-next|-f] generate announce email for for-next update\n"
}

update_version() {
@@ -96,6 +98,9 @@ while [ $# -gt 0 ]; do
LAST_HEAD=$2
shift
;;
+ --for-next|-f)
+ FOR_NEXT=1
+ ;;
--help|-h)
help
exit 0
@@ -108,6 +113,17 @@ while [ $# -gt 0 ]; do
shift
done

+if [ $FOR_NEXT -eq 1 ]; then
+ echo "Push your for-next branch:"
+ printf "\tgit push origin for-next:for-next\n"
+ prepare_mail "for-next"
+ if [ -n "$LAST_HEAD" ]; then
+ echo "Command to send ANNOUNCE email"
+ printf "\tneomutt -H $mail_file\n"
+ fi
+ exit 0
+fi
+
if [ -z "$EDITOR" ]; then
EDITOR=$(command -v vi)
fi

--
2.47.2