gluon/scripts/getversion.sh
Matthias Schiffer b5db6435e5
build: pass GLUON_VERSION and GLUON_SITE_VERSION to build
A helper script is introduced to get the version from `git describe`.
2021-10-05 21:48:07 +02:00

13 lines
203 B
Bash
Executable File

#!/bin/sh
if [ $# -ne 1 ]; then
echo >&2 "Usage: getversion.sh <directory>"
exit 1
fi
cd "$1" || exit 1
git --git-dir=.git describe --always --abbrev=7 --dirty=+ 2>/dev/null && exit 0
echo unknown