Add a script to make the version bump
This commit is contained in:
parent
5241f40dcf
commit
a4990e9da5
40
scripts/version-bump
Executable file
40
scripts/version-bump
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "USAGE: $0 VERSION CODENAME" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VER=$1
|
||||
FULLVER=$VER
|
||||
CODENAME=$2
|
||||
|
||||
[ "$(echo "$FULLVER" | grep -o -F . | wc -c)" -lt 3 ] && FULLVER="$FULLVER.0"
|
||||
|
||||
# update the files
|
||||
sed -e 's/^\(.. |(version)| replace:: \).*$/\1'"$VER"'/' -i doc/geany.txt
|
||||
sed -e 's/^\([ ]*version="\)[^"]*\("\)/\1'"$FULLVER"'.0\2/' -i geany.exe.manifest
|
||||
|
||||
sed -e '
|
||||
s/^\(#define VER_FILEVERSION *\)[^ ].*$/\1'"$(echo "$FULLVER" | tr . ,)"',0/
|
||||
s/^\(#define VER_FILEVERSION_STR *\)[^ ].*$/\1"'"$VER"'"/
|
||||
' -i geany_private.rc
|
||||
|
||||
sed -e 's/^\(AC_INIT([^,]*, *\[\)[^]]*\(\],\)/\1'"$VER"'\2/' -i configure.ac
|
||||
sed -e 's/^\(#define GEANY_CODENAME[ ]*"\)[^"]*\("\)/\1'"$CODENAME"'\2/' -i src/geany.h
|
||||
|
||||
sed -e '
|
||||
1i Geany '"$VER"' (unreleased)\n\n
|
||||
' -i NEWS
|
||||
|
||||
# show commit message to use
|
||||
cat <<EOF
|
||||
Message for the commit, after you have checked the changes:
|
||||
-----------------------------------------------------------
|
||||
|
||||
Post release version bump
|
||||
|
||||
Say hello to Geany $VER "$CODENAME"!
|
||||
EOF
|
Loading…
x
Reference in New Issue
Block a user