From 7664e97a640640bdae1744bc330d6dc3dcf620b0 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Mon, 20 Dec 2021 09:21:11 -0800 Subject: [PATCH] Use `grep` rather than `expr match` Co-authored-by: Taiki Endo --- main.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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