yggstack/contrib/semver/version.sh
Vasyl Gello b763fe3f59 Add README, LICENSE and buildscripts
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2023-11-27 18:29:27 +02:00

11 lines
216 B
Bash

#!/bin/sh
case "$*" in
*--bare*)
# Remove the "v" prefix
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" | cut -c 2-
;;
*)
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*"
;;
esac