gomicsv/support/get-version.sh
2022-07-10 14:34:22 +02:00

9 lines
202 B
Bash
Executable file

#!/usr/bin/env bash
VERSION_TAG=$(git tag -l | grep "v" | cut -c2-);
if [[ ${#VERSION_TAG} -ne 0 ]]; then
echo "$VERSION_TAG";
else
HASH=$(git rev-parse --short HEAD);
printf "git-%s" "$HASH"
fi;