Skip to content

goreleaser: embed VERSION #153

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

Merged
merged 1 commit into from
May 28, 2024
Merged

goreleaser: embed VERSION #153

merged 1 commit into from
May 28, 2024

Conversation

thepwagner
Copy link
Contributor

Replace the logic in Makefile that replaces cmd/ejson/version.go with the current tag.

It's more common to inject these variables during linking, instead of generating source code.

Verify like:

$ cat cmd/ejson/version.go
package main

var VERSION string = "1.5.0"

$ goreleaser build --snapshot --rm-dist

$ dist/ejson_darwin_arm64/ejson --version
ejson version 1.5.1-SNAPSHOT-1ecf7d7

@thepwagner thepwagner requested a review from burke as a code owner May 24, 2024 16:38
@thepwagner thepwagner merged commit d8c74dd into main May 28, 2024
@thepwagner thepwagner deleted the rm-version-go branch May 28, 2024 17:07
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