mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-25 07:31:05 -05:00
Check the semver pattern after setting the value (#3418)
This commit is contained in:
parent
4b6635f63b
commit
b4f9dd9ef4
1 changed files with 6 additions and 2 deletions
8
.github/workflows/deploy-release.yml
vendored
8
.github/workflows/deploy-release.yml
vendored
|
@ -45,8 +45,7 @@ jobs:
|
|||
- name: Get current release identifier
|
||||
# shellcheck disable=SC2062
|
||||
run: |
|
||||
RELESE_VERSION="$(echo ${{ github.event.release.name }} \
|
||||
| grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")"
|
||||
RELESE_VERSION="${{ github.event.release.name }}"
|
||||
|
||||
if [ -z "${RELEASE_VERSION}" ]; then
|
||||
echo "No release version found in environment, using input..."
|
||||
|
@ -59,6 +58,11 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! echo "${RELEASE_VERSION}" | grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+"; then
|
||||
echo "Error: RELEASE_VERSION doesn't look like a semantic version: ${RELEASE_VERSION}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
{
|
||||
echo "RELEASE_VERSION=${RELESE_VERSION}"
|
||||
echo "SEMVER_VERSION=${RELEASE_VERSION#v}"
|
||||
|
|
Loading…
Reference in a new issue