2017-12-27 11:45:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
current=$(cat meson.build | grep -Eo "version: '(.*)'" | grep -Eo "[0-9]+\.[0-9]+.[0-9]+")
|
|
|
|
mayor=$(echo $current | cut -d"." -f1)
|
|
|
|
minor=$(echo $current | cut -d"." -f2)
|
|
|
|
rev=$(echo $current | cut -d"." -f3)
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
"mayor")
|
|
|
|
next=$(echo $(($mayor + 1)).0.0)
|
|
|
|
;;
|
|
|
|
"minor")
|
|
|
|
next=$(echo $mayor.$(($minor + 1)).0)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
next=$(echo $mayor.$minor.$(($rev + 1)))
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
sed -i "s/$current/$next/" meson.build
|
|
|
|
sed -i "s/$current/$next/" fractal-gtk/Cargo.toml
|
2018-06-22 07:15:40 +00:00
|
|
|
sed -i "s/$current/$next/" fractal-matrix-api/Cargo.toml
|
2017-12-27 11:45:37 +00:00
|
|
|
sed -i "s/version=\"$current\".*/version=\"$next\" date=\"$(date +%Y-%m-%d)\"\/>/" fractal-gtk/res/org.gnome.Fractal.appdata.xml
|
|
|
|
|
2018-04-27 08:09:51 +00:00
|
|
|
cargo check
|
|
|
|
|
2017-12-27 11:45:37 +00:00
|
|
|
git commit -av
|
|
|
|
git tag -s $next
|
|
|
|
|
2018-04-17 09:41:42 +00:00
|
|
|
ninja -C _build release
|
2017-12-27 11:45:37 +00:00
|
|
|
#git push --tags
|