From 838bca083dc25df080786128956d3589b80e21f7 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 6 Jun 2021 02:33:11 -0500 Subject: [PATCH] remove bashisms for semver --- contrib/semver/version.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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