skupperproject / skupper-router

An application-layer router for Skupper networks
https://skupper.io
Apache License 2.0
14 stars 18 forks source link

Code to calculate BUILD_NUMBER considers deleted tags #1564

Closed ganeshmurthy closed 3 months ago

ganeshmurthy commented 3 months ago

Change BUILD_NUMBER calculation from

export BUILD_NUMBER=$((`curl -s https://quay.io/api/v1/repository/skupper/skupper-router/tag/?filter_tag_name=like:${VERSION} | jq .tags[].name | grep -E "\"${VERSION}-[0-9]+\"" | wc -l || echo 0` + 1))

to

export BUILD_NUMBER=$((`curl -s https://quay.io/api/v1/repository/skupper/skupper-router/tag/?filter_tag_name=like:${VERSION} | jq '.tags[] | select(has("end_ts") | not) | .name' | grep -E "\"${VERSION}-[0-9]+\"" | wc -l || echo 0` + 1))

Affected files are -

workflows/image-manual.yml
workflows/release-candidate.yml
workflows/release-respin.yml
workflows/release.yml
ganeshmurthy commented 3 months ago

Thanks to @fgiorgetti for coming up with the new BUILD_NUMBER