File: increment-version

package info (click to toggle)
cage 0.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236 kB
  • sloc: ansic: 2,574; sh: 53; makefile: 6
file content (25 lines) | stat: -rwxr-xr-x 549 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

if [ "$#" -ne 1 ]; then
  echo "usage: $0 <new-version>" >&2
  exit 1
fi

new_version="$1"

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

set -x

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

echo -n "Minimum wlroots version? "
read -r wlr_version_min

sed -i meson.build -e "s/'wlroots', version: '.*'/'wlroots', version: '>= $wlr_version_min'/"

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