forked from polybar/polybar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbump.sh
More file actions
executable file
·27 lines (20 loc) · 770 Bytes
/
bump.sh
File metadata and controls
executable file
·27 lines (20 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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 \
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
git commit -m "build: Bump version to ${tag_curr}"
# Recreate the tag to include the last commit
[ $# -eq 1 ] && git tag -f "$@"