Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/publish-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,10 @@ jobs:
- name: Compute RC version
id: version
run: |
BASE=$(jq -r '.info.version' openapi.json)
TAGS=$(git ls-remote --tags --refs origin)

# Staging may not be bumped yet; target the next unreleased patch
while echo "$TAGS" | grep -q "refs/tags/${BASE}$"; do
BASE=$(echo "$BASE" | awk -F. -v OFS=. '{$3++; print}')
done
# Staging spec version is not semver; target the patch after the latest release
LATEST=$(git ls-remote --tags --refs origin \
| grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
BASE=$(echo "$LATEST" | awk -F. -v OFS=. '{$3++; print}')

N=$(git ls-remote --tags --refs origin "refs/tags/${BASE}-rc.*" | wc -l)
VERSION="${BASE}-rc.$((N + 1))"
Expand Down
Loading