aboutsummaryrefslogtreecommitdiff
path: root/contrib/_incr_version
blob: a4fa265475eec4c5c65e7ced888830421afcce26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -eu
old_version="$1"
new_version="$2"

if [ "$new_version" != "${new_version#v}" ]
then
	echo "Error: The new version shouldn't be prefixed with a \"v\"." >&2
	exit 1
fi

sed -i meson.build -e "s/^	version: .*#release_version/	version: '$new_version', #release_version/g"

printf "Minimum wlroots version? "
read wlr_version_min
printf "Maximum wlroots version? "
read wlr_version_max

sed -i meson.build -e "s/wlroots_version =.*/wlroots_version = ['>=$wlr_version_min', '<$wlr_version_max']/"

git add meson.build
git commit -m "Update version to $new_version"