-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
When a user has a problem, it is useful to know what version they're trying. Today, if all they have is a binary, it's difficult to impossible to tell. Since otel-cli is intended to get buried in build systems, Docker containers, OS installers, and the like, it's probably going to be important for operators of these systems to be able to tell what version is installed.
goreleaser can set ldflags to version, commit, and date in the go binary, so that it can report this information to users
Seen in another repo:
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
and then in main.go
var (
// Populated by goreleaser during build
version = "master"
commit = "?"
date = ""
)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed