Skip to content

Commit 047cbcf

Browse files
committed
WIP debugging
1 parent 684f1e1 commit 047cbcf

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,18 @@ jobs:
3131
3232
- name: Fetch all tags
3333
run: |
34-
git fetch --prune --unshallow || true
35-
git fetch --tags --quiet
34+
git fetch --prune --unshallow || echo "Already unshallowed or failed, continuing"
35+
git fetch --tags --quiet || echo "Failed to fetch tags, continuing"
3636
37-
- name: Ensure tag is newer than latest
37+
- name: Ensure tag is newer than latest (unless pre-release)
3838
run: |
3939
CURRENT="${{ steps.extract-tag.outputs.tag }}"
40-
LATEST=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
40+
LATEST=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+([ab][0-9]+)?$' | head -n 1)
4141
4242
echo "Current tag: $CURRENT"
4343
echo "Latest tag: $LATEST"
4444
45-
if [ -n "$LATEST" ]; then
46-
python3 -c "from packaging.version import parse; import sys; if parse('$CURRENT'[1:]) <= parse('$LATEST'[1:]): sys.exit('Tag ' + '$CURRENT' + ' is not newer than latest tag ' + '$LATEST')"
47-
fi
45+
python .github/scripts/validate_tag.py "$CURRENT" "$LATEST"
4846
4947
build:
5048
needs: validate-tag

0 commit comments

Comments
 (0)