diff --git a/main.sh b/main.sh index dda59eb..1e8ee5d 100755 --- a/main.sh +++ b/main.sh @@ -41,7 +41,7 @@ fi version="${tag}" # extract the portion of the tag matching the prefix pattern if [[ ! "${prefix}" = "" ]]; then - prefix=$(expr match "${tag}" "\(${prefix}\)") + prefix=$(grep <<<"${tag}" -Eo "^${prefix}") version="${tag#${prefix}}" version="${version#-}" fi