update JS keywords and extensions (#3440)
[geany-mirror.git] / scripts / version-bump
bloba122de8054d58fb40e8b22047660af1a8f8a37d3
1 #!/bin/sh
3 set -e
5 if [ $# -ne 2 ]; then
6 echo "USAGE: $0 VERSION CODENAME" >&2
7 exit 1
8 fi
10 VER=$1
11 FULLVER=$VER
12 CODENAME=$2
14 [ "$(echo "$FULLVER" | grep -o -F . | wc -c)" -lt 3 ] && FULLVER="$FULLVER.0"
16 # update the files
17 sed -e 's/^\(.. |(version)| replace:: \).*$/\1'"$VER"'/' -i doc/geany.txt
18 sed -e 's/^\([ ]*version="\)[^"]*\("\)/\1'"$FULLVER"'.0\2/' -i geany.exe.manifest
20 sed -e '
21 s/^\(#define VER_FILEVERSION *\)[^ ].*$/\1'"$(echo "$FULLVER" | tr . ,)"',0/
22 s/^\(#define VER_FILEVERSION_STR *\)[^ ].*$/\1"'"$VER"'"/
23 ' -i geany_private.rc
25 sed -e 's/^\(AC_INIT([^,]*, *\[\)[^]]*\(\],\)/\1'"$VER"'\2/' -i configure.ac
26 sed -re '/^project\W/,/[)]/s/^(.*\Wversion\s*:\s*)'\''[^'\'']*'\''(.*)$/\1'"'$VER'"'\2/' -i meson.build
27 sed -e 's/^\(#define GEANY_CODENAME[ ]*"\)[^"]*\("\)/\1'"$CODENAME"'\2/' -i src/geany.h
29 sed -e '
30 1i Geany '"$VER"' (unreleased)\n\n
31 ' -i NEWS
33 # show commit message to use
34 cat <<EOF
35 Message for the commit, after you have checked the changes:
36 -----------------------------------------------------------
38 Post release version bump
40 Say hello to Geany $VER "$CODENAME"!
41 EOF