Skip to content

Commit fc81a36

Browse files
committed
fix: fix version check
Signed-off-by: Jan Pokorný <JenomPokorny@gmail.com>
1 parent 7e32921 commit fc81a36

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- uses: ./.github/actions/setup
8888
env:
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90-
- run: mise run version:check
90+
- run: mise run common:check:version
9191
- uses: docker/setup-qemu-action@v3
9292
- uses: docker/setup-buildx-action@v3
9393
- uses: docker/login-action@v3

mise.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ run = "addlicense -check -l apache -s=only -c '© BeeAI a Series of LF Projects,
101101

102102
[tasks."common:check:version"]
103103
dir = "{{config_root}}"
104-
run = """
104+
run = '''
105105
#!/bin/bash
106106
set -e -o pipefail
107107
@@ -127,11 +127,16 @@ if [ "$helm_version" != "$helm_app_version" ] || \
127127
exit 1
128128
fi
129129
130+
if ! [[ "$helm_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?$ ]]; then
131+
echo "ERROR: Invalid version format. Use #.#.# or #.#.#-rc#"
132+
exit 1
133+
fi
134+
130135
if [[ "$GITHUB_REF" == refs/tags/v* && "$GITHUB_REF" != "refs/tags/v$helm_version" ]]; then
131136
echo "GITHUB_REF '$GITHUB_REF' does not match expected 'refs/tags/v$helm_version'"
132137
exit 1
133138
fi
134-
"""
139+
'''
135140

136141
### fix
137142

@@ -177,6 +182,7 @@ while true; do
177182
break
178183
else
179184
echo "ERROR: Invalid version format. Use #.#.# or #.#.#-rc#"
185+
exit 1
180186
fi
181187
done
182188

0 commit comments

Comments
 (0)