yggdrasil-go/contrib/semver/version.sh

12 lines
216 B
Bash
Raw Normal View History

2018-03-05 22:34:23 +03:00
#!/bin/sh
2021-06-06 10:33:11 +03:00
case "$*" in
*--bare*)
2021-06-06 00:28:29 +03:00
# Remove the "v" prefix
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" | cut -c 2-
2021-06-06 10:33:11 +03:00
;;
*)
2021-06-06 00:28:29 +03:00
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*"
2021-06-06 10:33:11 +03:00
;;
esac