Skip to content

Commit

Permalink
standardize version regex in release pipeline (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
wren committed Dec 20, 2020
1 parent 3dec226 commit 2e9e857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yaml
Expand Up @@ -35,7 +35,7 @@ jobs:
if [[ $GITHUB_REF =~ ^refs/tags/ ]]; then
# This is a tag build (i.e. a release)
echo '::debug::Release build'
if [[ ! $BRANCH =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)(\.[0-9]+)?)?$ ]]; then
if [[ ! $BRANCH =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)([0-9]+)?)?$ ]]; then
echo "::error::Invalid tag format: ${BRANCH}"
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Version (e.g. v2.5 or v2.5.1-beta)'
description: 'Version (e.g. v2.5, v2.5.1-beta, v2.6-beta2)'
required: true

jobs:
Expand All @@ -15,7 +15,7 @@ jobs:
run: |
JRNL_VERSION="${{ github.event.inputs.version }}"
echo "::debug::version: $JRNL_VERSION"
if [[ ! $JRNL_VERSION =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)(\.[0-9]+)?)?$ ]]; then
if [[ ! $JRNL_VERSION =~ ^v[0-9]+(\.[0-9]+){1,2}(-(alpha|beta)([0-9]+)?)?$ ]]; then
echo
echo "::error::Bad version"
echo
Expand Down

0 comments on commit 2e9e857

Please sign in to comment.