netgen/package/fedora/rpkg.macros
Monty Montgomery da386ea674 Add a fedora package spec and setup
Build all Netgen RPMs from cli via:
rpkg local --spec package/fedora/netgen-mesher-bleed.spec
from the toplevel source directory
2022-05-15 04:30:06 -04:00

16 lines
420 B
Plaintext

function git_last_tag_raw {
git describe --tags --abbrev=0
}
function git_last_tag {
git_last_tag_raw |
sed -e 's/^[^0-9]*//g' |
sed -e 's/[.!@#$%^&*_+=-]*\(pre\|rc\|alpha\|beta\|test\)/~\1/g' |
sed -e 's/[!@#$%^&*_+=-]*\(post\|fix\|patch\|pl\|update\)/.\1/g' |
sed -e 's/[^A-Za-z0-9._~-]/_/g'
}
function git_last_tag_commits {
echo -n $(git rev-list --count $(git_last_tag_raw)..HEAD)
}