diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2020-07-16 13:39:39 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-07-17 05:44:24 -0600 |
commit | 380f6c9b46283cf927bc84f7fafd1e0eda230cb5 (patch) | |
tree | aa6376da7399eaa5e4bc708833ea33faa28be412 /contrib | |
parent | meson.build: Fix the version format (diff) | |
download | sway-380f6c9b46283cf927bc84f7fafd1e0eda230cb5.tar.gz sway-380f6c9b46283cf927bc84f7fafd1e0eda230cb5.tar.zst sway-380f6c9b46283cf927bc84f7fafd1e0eda230cb5.zip |
contrib/_incr_version: Disallow the "v"-prefixed version format
The check is a bit strange but should be POSIX compliant.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/_incr_version | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/_incr_version b/contrib/_incr_version index 436faf14..a4fa2654 100755 --- a/contrib/_incr_version +++ b/contrib/_incr_version | |||
@@ -1,6 +1,13 @@ | |||
1 | #!/bin/sh -eu | 1 | #!/bin/sh -eu |
2 | old_version="$1" | 2 | old_version="$1" |
3 | new_version="$2" | 3 | new_version="$2" |
4 | |||
5 | if [ "$new_version" != "${new_version#v}" ] | ||
6 | then | ||
7 | echo "Error: The new version shouldn't be prefixed with a \"v\"." >&2 | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
4 | sed -i meson.build -e "s/^ version: .*#release_version/ version: '$new_version', #release_version/g" | 11 | sed -i meson.build -e "s/^ version: .*#release_version/ version: '$new_version', #release_version/g" |
5 | 12 | ||
6 | printf "Minimum wlroots version? " | 13 | printf "Minimum wlroots version? " |