diff --git a/contrib/semver/version.sh b/contrib/semver/version.sh index c677e96b..d2ec6ce1 100644 --- a/contrib/semver/version.sh +++ b/contrib/semver/version.sh @@ -1,8 +1,11 @@ #!/bin/sh -if [[ $* == *--bare* ]]; then +case "$*" in + *--bare*) # 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 + ;; +esac