-
Notifications
You must be signed in to change notification settings - Fork 272
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
BuildDate is always the current time #366
Comments
Here's a possible way of injecting build data: https://blog.alexellis.io/inject-build-time-vars-golang/#overridegobuild version.go package main
import (
// ...
)
var BuildDate string
func newVersionCommand() *cobra.Command {
// ...
} go build -ldflags "-X main.BuildDate=$(datetime command here)" |
Ah ok, so It's just being overwritten by |
If |
Sounds good @jannfis. Just wondering, should we follow how Or is it quite useful to have the current time when using |
Describe the bug
The build date is always the current time.
To Reproduce
Run
argocd-image-updater version
twice in a row (at least a second apart).Expected behavior
The actual binary build date time.
Additional context
This line gets the runtime datetime:
argocd-image-updater/pkg/version/version.go
Line 11 in 71551f9
Version
Logs
Please paste any relevant logs here
The text was updated successfully, but these errors were encountered: