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 version via -ldflags #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmke
Copy link
Contributor

@dmke dmke commented Jul 6, 2021

This automates tagging/building a bit and removes duplication.

Goreleaser, by default, adds versioning information to the go build and go release call:

$ goreleaser build --rm-dist --single-target --snapshot
   ...
   • getting and validating git state
      • releasing 0.4.7, commit d20774f4fa356511f93c7c5f0a8501117ddf1114
   ...

$ artifacts/ping_exporter_linux_amd64/ping_exporter --version
ping-exporter
Version: 0.4.7-SNAPSHOT-d20774f
Author(s): Philip Berndroth, Daniel Czerwonk
Metric exporter for go-icmp

This automates tagging/building a bit and removes duplication.
Goreleaser, by default, adds versioning information to the
`go build` call.

For all other cases, it is OK to just call the development build
just that: "development".
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