Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version check in verson.yaml Workflow #279

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

egibs
Copy link
Member

@egibs egibs commented Jun 22, 2024

We were validating the updated version string against a regex expression that expected the string to be prefixed with v when we only update the actual semver.

This PR removes adds the v prefix to the printf statements in version.yaml to fix this failure:

Error: VERSION is not a valid semver

and removes the v from the version string in this line (original code shown):

sed -i -e "s/ID string = \"v[0-9]+\.[0-9]+\.[0-9]+\"/ID string = \"v$VERSION\"/" ${{ env.VERSION_FILE }}

I tested this locally and it fixed the issue --

Fixed code:

❯ ./test.sh patch
Current bincapz version: v0.13.1
New bincapz version: v0.13.2

Original code:

❯ ./test.sh patch
v0.13.1
Error: 0.13.2 is not a valid semver

@egibs egibs requested a review from tstromberg June 22, 2024 18:22
@egibs egibs enabled auto-merge (squash) June 22, 2024 18:22
.github/workflows/version.yaml Outdated Show resolved Hide resolved
@egibs egibs changed the title Don't check updated version with v prefix Fix version check in verson.yaml Workflow Jun 22, 2024
@egibs egibs force-pushed the fix-version-bump branch 2 times, most recently from a61c998 to 3e8aff1 Compare June 22, 2024 18:42
@egibs egibs force-pushed the fix-version-bump branch from 3e8aff1 to 04635f6 Compare June 22, 2024 18:44
@egibs egibs merged commit 350f0e4 into chainguard-dev:main Jun 23, 2024
5 checks passed
@egibs egibs deleted the fix-version-bump branch June 23, 2024 13:50
egibs added a commit to egibs/malcontent that referenced this pull request Aug 5, 2024
egibs added a commit to egibs/malcontent that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants