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

Add -version flag #17

Merged
merged 1 commit into from
Apr 3, 2020
Merged

Add -version flag #17

merged 1 commit into from
Apr 3, 2020

Conversation

rothgar
Copy link
Collaborator

@rothgar rothgar commented Apr 2, 2020

I'm open to suggestions on defaults for version and commit.
goreleaser will automatically add flags

-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser

We can customize it if we want.

fixes #7

I'm open to suggestions on defaults for version and commit.
goreleaser will automatically add flags
```
-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser
```

We can customize it if we want.

fixes #7
@rothgar rothgar requested a review from sendqueery April 2, 2020 00:37
@rothgar
Copy link
Collaborator Author

rothgar commented Apr 2, 2020

Link to goreleaser doc
https://goreleaser.com/customization/#Builds

@sendqueery
Copy link
Collaborator

Does this PR need to update .goreleaser.yml as well?

@rothgar
Copy link
Collaborator Author

rothgar commented Apr 3, 2020

No updated needed because main.version is already part of the default goreleaser build flags

@sendqueery
Copy link
Collaborator

LGTM!

@rothgar rothgar merged commit 33b2f96 into master Apr 3, 2020
@sendqueery sendqueery deleted the version-flag branch June 18, 2020 18:27
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.

Add --version flag
2 participants