hack: mutualize build opts in Makefile and Dockerfile

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-11-29 12:54:15 +01:00
committed by CrazyMax
parent eba49fdefd
commit 23b217af24
4 changed files with 76 additions and 16 deletions

16
hack/git-meta Executable file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env sh
set -e
case $1 in
"version")
git describe --match 'v[0-9]*' --dirty='.m' --always --tags
;;
"revision")
echo "$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)"
;;
*)
echo "usage: ./hack/git-meta <version|revision>"
exit 1
;;
esac