2016-06-13 23:39:17 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-06-28 08:50:21 -04:00
|
|
|
# Use passed argument as new tag
|
2016-10-28 07:02:13 -04:00
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
version=$(git describe --tags --abbrev=0)
|
|
|
|
patch=${version##*.}
|
|
|
|
set -- "${version%.*}.$((patch+1))"
|
|
|
|
fi
|
|
|
|
|
|
|
|
git tag "$@" || exit 1
|
2016-06-28 08:50:21 -04:00
|
|
|
|
2016-06-13 23:39:17 -04:00
|
|
|
# shellcheck disable=SC2016
|
|
|
|
tag_prev=$(git tag -l | tail -2 | head -1)
|
|
|
|
tag_curr=$(git tag -l | tail -1)
|
|
|
|
|
2016-06-28 09:24:23 -04:00
|
|
|
./version.sh "$tag_curr"
|
|
|
|
|
2016-06-28 10:21:53 -04:00
|
|
|
sed -r "s/${tag_prev}/${tag_curr}/g" -i \
|
|
|
|
README.md CMakeLists.txt \
|
|
|
|
contrib/lemonbuddy.aur/PKGBUILD contrib/lemonbuddy.aur/.SRCINFO \
|
|
|
|
contrib/lemonbuddy-git.aur/PKGBUILD contrib/lemonbuddy-git.aur/.SRCINFO
|
|
|
|
|
|
|
|
git add -u README.md CMakeLists.txt \
|
|
|
|
contrib/lemonbuddy.aur/PKGBUILD contrib/lemonbuddy.aur/.SRCINFO \
|
|
|
|
contrib/lemonbuddy-git.aur/PKGBUILD contrib/lemonbuddy-git.aur/.SRCINFO \
|
|
|
|
include/version.hpp
|
|
|
|
|
2016-06-13 23:39:17 -04:00
|
|
|
git commit -m "build: Bump version to ${tag_curr}"
|
2016-06-28 08:50:21 -04:00
|
|
|
|
|
|
|
# Recreate the tag to include the last commit
|
|
|
|
[ $# -eq 1 ] && git tag -f "$@"
|