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

Handle release versions on init in a backwards compatible way #663

Conversation

Racer159
Copy link
Contributor

@Racer159 Racer159 commented Aug 8, 2022

The leading v in the Zarf version was silently erroring the backwards compatibility for Zarf init package pulling.

Related Issue

Fixes #529

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist before merging

  • (Optional) Changes have been linted locally with golangci-lint. (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.)

@Racer159 Racer159 requested review from jeff-mccoy and YrrepNoj August 8, 2022 17:35
@Racer159 Racer159 force-pushed the 529-zarf-init-should-warn-when-the-binary-is-out-of-sync-with-a-release branch from e927e02 to 7301e89 Compare August 8, 2022 19:49
@Racer159
Copy link
Contributor Author

Racer159 commented Aug 8, 2022

@Megamind came to this after some discussions with @YrrepNoj as it will pull the correct init release if we ever needed to go backward on a branch and build something (or if a breaking release was just pushed and someone was working off of an older version of the code). We cannot completely get rid of the semver package as it is an indirect dependency of another library.

@Racer159
Copy link
Contributor Author

Racer159 commented Aug 8, 2022

I also removed the spaces so that the Make versions are correct and do not contain a leading space.

@jeff-mccoy
Copy link
Contributor

I also removed the spaces so that the Make versions are correct and do not contain a leading space.

okay now you're just showing off 😆.

Copy link
Contributor

@jeff-mccoy jeff-mccoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave the strim thing up to you, otherwise lgtm

src/cmd/initialize.go Show resolved Hide resolved
@Racer159 Racer159 changed the title Change from StrictNewVersion to NewVersion to account for the leading v Handle release versions on init in a backwards compatible way Aug 8, 2022
@jeff-mccoy jeff-mccoy enabled auto-merge (squash) August 9, 2022 04:10
@jeff-mccoy jeff-mccoy merged commit b8f9fcd into master Aug 9, 2022
@jeff-mccoy jeff-mccoy deleted the 529-zarf-init-should-warn-when-the-binary-is-out-of-sync-with-a-release branch August 9, 2022 04:19
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.

Zarf Init should warn when the binary is out of sync with a release
2 participants