forked from geany/geany-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add version-bump script (geany#1288)
- Loading branch information
1 parent
e645a80
commit da0af06
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <<EOF | ||
Message for the commit, after you have checked the changes: | ||
----------------------------------------------------------- | ||
Post release version bump | ||
EOF |