5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-13 00:30:28 +00:00
yggdrasil-go/contrib/semver/version.sh
2021-06-05 22:38:37 +01:00

9 lines
205 B
Bash

#!/bin/sh
if [[ $* == *--bare* ]]; then
# Remove the "v" prefix
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*" | cut -c 2-
else
git describe --tags --match="v[0-9]*\.[0-9]*\.[0-9]*"
fi