diff mbox series

[2/4] release.sh: add --kup to upload release tarball to kernel.org

Message ID 20250110-update-release-v1-2-61e40b8ffbac@kernel.org (mailing list archive)
State New
Headers show
Series Update release.sh | expand

Commit Message

Andrey Albershteyn Jan. 10, 2025, 11:05 a.m. UTC
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
---
 release.sh | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
diff mbox series

Patch

diff --git a/release.sh b/release.sh
index b15ed610082f34928827ab0547db944cf559cef4..a23adc47efa5163b4e0082050c266481e4051bfb 100755
--- a/release.sh
+++ b/release.sh
@@ -16,6 +16,30 @@  set -e
 version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
 date=`date +"%-d %B %Y"`
 
+KUP=0
+
+help() {
+	echo "$(basename) - create xfsprogs release"
+	printf "\t[--kup|-k] upload final tarball with KUP\n"
+}
+
+while [ $# -gt 0 ]; do
+	case "$1" in
+		--kup|-k)
+			KUP=1
+			;;
+		--help|-h)
+			help
+			exit 0
+			;;
+		*)
+			>&2 printf "Error: Invalid argument\n"
+			exit 1
+			;;
+		esac
+	shift
+done
+
 echo "Cleaning up"
 make realclean
 rm -rf "xfsprogs-${version}.tar" \
@@ -52,4 +76,11 @@  gpg \
 
 mv "xfsprogs-${version}.tar.asc" "xfsprogs-${version}.tar.sign"
 
+if [ $KUP -eq 1 ]; then
+	kup put \
+		xfsprogs-${version}.tar.gz \
+		xfsprogs-${version}.tar.sign \
+		pub/linux/utils/fs/xfs/xfsprogs/xfsprogs-${version}.tar.gz
+fi;
+
 echo "Done. Please remember to push out tags using \"git push origin v${version}\""