diff --git a/pkg/buildinfo/buildinfo.go b/pkg/buildinfo/buildinfo.go index 2f829749c..4b8a6c6a3 100644 --- a/pkg/buildinfo/buildinfo.go +++ b/pkg/buildinfo/buildinfo.go @@ -1,10 +1,14 @@ package buildinfo +// GitInfo is either the empty string (the default) +// or is set to the git hash of the most recent commit +// using the -X linker flag. For example, it's set like: +// $ go install --ldflags="-X camlistore.org/pkg/buildinfo.GitInfo "`./misc/gitversion` camlistore.org/server/camlistored var GitInfo string func Version() string { if GitInfo != "" { return GitInfo } - return "unknown" // TODO: show binary's date? + return "unknown" }