From 1769cf9e9c4032d8c4744c664243a428ace09186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sat, 21 Oct 2023 23:45:53 +0200 Subject: [PATCH] Add version-bump script --- build/version-bump | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 build/version-bump diff --git a/build/version-bump b/build/version-bump new file mode 100755 index 000000000..4adf9e503 --- /dev/null +++ b/build/version-bump @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if [ $# -ne 1 ]; then + echo "USAGE: $0 VERSION" >&2 + exit 1 +fi + +VER=$1 +FULLVER=$VER + +[ "$(echo "$FULLVER" | grep -o -F . | wc -c)" -lt 3 ] && FULLVER="$FULLVER.0" + +# update the files +sed -e 's/^\(AC_INIT([^,]*, *\[\)[^]]*\(\])\)/\1'"$VER"'\2/' -i configure.ac +sed -e ' +s/^\(!define PRODUCT_VERSION \)".*$/\1"'"$VER"'"/ +s/^\(!define PRODUCT_VERSION_ID \)".*$/\1"'"${FULLVER}.0"'"/ +' -i build/geany-plugins.nsi + +sed -e ' +1i Geany-Plugins '"$VER"' (unreleased)\n\n +' -i NEWS + +# show commit message to use +cat <