Skip to content

Commit

Permalink
Use grep rather than expr match
Browse files Browse the repository at this point in the history
Co-authored-by: Taiki Endo <[email protected]>
  • Loading branch information
hawkw and taiki-e committed Dec 21, 2021
1 parent 3757daf commit 7664e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7664e97

Please sign in to comment.