polybar-dwm/bump.sh

18 lines
549 B
Bash
Raw Normal View History

2016-06-14 03:39:17 +00:00
#!/bin/sh
2016-06-28 12:50:21 +00:00
# Use passed argument as new tag
[ $# -eq 1 ] && git tag "$@"
./version.sh
2016-06-14 03:39:17 +00:00
# shellcheck disable=SC2016
tag_prev=$(git tag -l | tail -2 | head -1)
tag_curr=$(git tag -l | tail -1)
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 commit -m "build: Bump version to ${tag_curr}"
2016-06-28 12:50:21 +00:00
# Recreate the tag to include the last commit
[ $# -eq 1 ] && git tag -f "$@"