Skip to content

Commit 21c7e2a

Browse files
chore: PR feedback - remove unused captured groups
1 parent b12bbd9 commit 21c7e2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
VERSION="${{ steps.get-version.outputs.VERSION }}"
5151
5252
# Extract the release channel (latest, alpha, beta, rc)
53-
if [[ $VERSION =~ ^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-(.+))?$ ]]; then
54-
if [[ -n "${BASH_REMATCH[5]}" ]]; then
55-
CAPTURED_CHANNEL="${BASH_REMATCH[5]}"
53+
if [[ $VERSION =~ ^v?[0-9]+\.[0-9]+\.[0-9]+(-(.+))?$ ]]; then
54+
if [[ -n "${BASH_REMATCH[2]}" ]]; then
55+
CAPTURED_CHANNEL="${BASH_REMATCH[2]}"
5656
# The captured channel might have more dots, cases like
5757
# v1.2.3-alpha.1 For such cases we only want the channel relevant
5858
# part which is alpha.

0 commit comments

Comments
 (0)