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

traefik version command contains incorrect information when building from master branch #569

Closed
kashook opened this issue Jul 29, 2016 · 1 comment
Labels

Comments

@kashook
Copy link

kashook commented Jul 29, 2016

When building traefik from the master branch recently, I noticed that when I execute the traefik version command, the data displayed are the default hard coded values:

Version:      dev
Codename:     cheddar
Go version:   go1.6.3
Built:        I don't remember exactly
OS/Arch:      linux/amd64

I believe the problem is related to this changeset moving the version-related variables out of the main package.

To fix, I think this line needs changed so that the variables that are being replaced contain the fully qualified package name, like this:

CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w -X github.com/containous/traefik/version.Version=$VERSION -X github.com/containous/traefik/version.Codename=$CODENAME -X github.com/containous/traefik/version.BuildDate=$DATE" -a -installsuffix nocgo -o dist/traefik .

When I make that change locally, the version command seems to print the right stuff:

Version:      7abe68fac10ab42bbc59dddef622d730abff950a
Codename:     cheddar
Go version:   go1.6.3
Built:        2016-07-29_07:17:47PM
OS/Arch:      linux/amd64

I don't know Go all that well. I'd be willing to submit a pull request but I'm hoping someone from this project will comment whether this seems like the right fix. I also wouldn't mind if someone just fixed it. :)

@emilevauge emilevauge added the bug label Jul 30, 2016
@errm
Copy link
Contributor

errm commented Jul 31, 2016

Looks like the correct fix to me, feel free to open a PR if you wish @keiths-osc

@ldez ldez added the kind/bug/confirmed a confirmed bug (reproducible). label Apr 29, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants