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

Set CLI version automatically by the release process #805

Merged
merged 2 commits into from
Jul 27, 2022

Conversation

ofalvai
Copy link
Contributor

@ofalvai ofalvai commented Jul 27, 2022

Instead of hardcoding the version number into the source code (which we forgot to increment multiple times), inject the version string using Goreleaser and LDFLAGS. This way the single source of truth is the git tag that triggers the release process (Goreleaser picks up that tag).

Note: I removed a version test case on purpose. This didn't save us from forgetting to bump the version, and one more place to edit the version number manually, so I don't think this test has any value.

@ofalvai ofalvai merged commit 8bbfb4c into master Jul 27, 2022
@ofalvai ofalvai deleted the use-automatic-versioning branch July 27, 2022 10:03
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