mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
380f6c9b46
The check is a bit strange but should be POSIX compliant.
22 lines
573 B
Bash
Executable File
22 lines
573 B
Bash
Executable File
#!/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"
|