Skip to content

Commit a52febe

Browse files
committed
Use shell, not sed, to parse release tag
1 parent c249e21 commit a52febe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
3131
tagPat="^v$verPat(#.*)?$"
3232

3333
if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
34-
tagVer=$(echo $TRAVIS_TAG | sed s/#.*// | sed s/^v//)
34+
tagVer=${TRAVIS_TAG}
35+
tagVer=${tagVer#v} # Remove `v` at beginning.
36+
tagVer=${tagVer%%#*} # Remove anything after `#`.
3537
publishVersion='set every version := "'$tagVer'"'
3638

3739
if [ "$RELEASE_COMBO" = "true" ]; then

0 commit comments

Comments
 (0)