1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-11 13:50:56 -05:00
polybar/bump.sh
2016-06-28 15:24:23 +02:00

20 lines
608 B
Bash
Executable file

#!/bin/sh
# Use passed argument as new tag
[ $# -eq 1 ] && {
git tag "$@" || exit 1
}
# shellcheck disable=SC2016
tag_prev=$(git tag -l | tail -2 | head -1)
tag_curr=$(git tag -l | tail -1)
./version.sh "$tag_curr"
sed -r "s/${tag_prev}/${tag_curr}/g" -i README.md CMakeLists.txt contrib/lemonbuddy.aur/PKGBUILD contrib/lemonbuddy.aur/.SRCINFO
git add README.md CMakeLists.txt contrib/lemonbuddy.aur/PKGBUILD contrib/lemonbuddy.aur/.SRCINFO
git add -u include/version.hpp
git commit -m "build: Bump version to ${tag_curr}"
# Recreate the tag to include the last commit
[ $# -eq 1 ] && git tag -f "$@"