aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-01-22 21:03:30 +0100
committerSimon Ser <contact@emersion.fr>2020-01-24 11:17:03 +0100
commit1f722f5c800b1e422ffa480710d7af7c1e7dc0c4 (patch)
treec02a443fd9f6626baf781ee5ce4a905349df408a /contrib
parent70a084c119695c7d82b4e3a97c35555d0af91d62 (diff)
build: replace version with soversion
This allows us to have a single number to update when doing a release. This drops WLR_VERSION_API_* definitions.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/_incr_version29
1 files changed, 12 insertions, 17 deletions
diff --git a/contrib/_incr_version b/contrib/_incr_version
index 376be44c..949c845b 100755
--- a/contrib/_incr_version
+++ b/contrib/_incr_version
@@ -3,31 +3,26 @@ old_version="$1"
new_version="$2"
sed -i meson.build -e "s/version: '$old_version'/version: '$new_version'/g"
-printf "Backwards-incompatible ABI changes? (y/n) "
-read inc_age
-if [ "$inc_age" = 'n' ]
+bugfix='n'
+printf "Breaking API changes? (y/n) "
+read breaking
+if [ "$breaking" = 'n' ]
then
- printf "Interface(s) added, removed, or changed? (y/n) "
- read inc_current
+ printf "Bugfix release (no backwards-incompatible ABI changes)? (y/n) "
+ read bugfix
fi
-so_version=$(egrep '^so_version =' meson.build | cut -d'[' -f2- | cut -d']' -f1)
-current=$(echo "$so_version" | cut -d',' -f1 | sed -e "s/'//g" -e "s/ //g")
-revision=$(echo "$so_version" | cut -d',' -f2 | sed -e "s/'//g" -e "s/ //g")
-age=$(echo "$so_version" | cut -d',' -f3 | sed -e "s/'//g" -e "s/ //g")
+soversion=$(egrep '^soversion =' meson.build | cut -d'=' -f2-)
+soversion=$((soversion))
-if [ "$inc_age" = 'y' ]
+if [ "$bugfix" != 'y' ]
then
- age=$((age+1))
- current=$((current+1))
-elif [ "$inc_current" = 'y' ]
-then
- current=$((current+1))
+ soversion=$((soversion+1))
fi
-revision=$((revision+1))
sed -i meson.build \
- -e "s/so_version = .*/so_version = ['$current', '$revision', '$age']/g"
+ -e "s/soversion = .*/soversion = $soversion/g"
+exit 1
git add meson.build
git commit -m "Update version to $new_version"