mirror of
https://github.com/super-linter/super-linter.git
synced 2025-01-09 07:54:55 -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
|
- name: Get current release identifier
|
||||||
# shellcheck disable=SC2062
|
# shellcheck disable=SC2062
|
||||||
run: |
|
run: |
|
||||||
RELESE_VERSION="$(echo ${{ github.event.release.name }} \
|
RELESE_VERSION="${{ github.event.release.name }}"
|
||||||
| grep -E -o "v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+")"
|
|
||||||
|
|
||||||
if [ -z "${RELEASE_VERSION}" ]; then
|
if [ -z "${RELEASE_VERSION}" ]; then
|
||||||
echo "No release version found in environment, using input..."
|
echo "No release version found in environment, using input..."
|
||||||
|
@ -59,6 +58,11 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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 "RELEASE_VERSION=${RELESE_VERSION}"
|
||||||
echo "SEMVER_VERSION=${RELEASE_VERSION#v}"
|
echo "SEMVER_VERSION=${RELEASE_VERSION#v}"
|
||||||
|
|
Loading…
Reference in a new issue