Report version in registry binary
We've added support to the registry command to report the current version of the distribution package. The version package is generated with a shell script that gets the latest tag and add "+unknown". This allows builds from "go get" and "go install" to have a rough version number. Generated periodically, it will provide a decent indication of what code built the binary. For more accurate versioning, one can build with the "binaries" make target. Linker flags are used to replace the version string with the actual current tag at build time. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
c4406baf8a
commit
d0abfe0b92
5 changed files with 70 additions and 6 deletions
11
version/version.go
Normal file
11
version/version.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package version
|
||||
|
||||
// Package is the overall, canonical project import path under which the
|
||||
// package was built.
|
||||
var Package = "github.com/docker/distribution"
|
||||
|
||||
// Version indicates which version of the binary is running. This is set to
|
||||
// the latest release tag by hand, always suffixed by "+unknown". During
|
||||
// build, it will be replaced by the actual version. The value here will be
|
||||
// used if the registry is run after a go get based install.
|
||||
var Version = "v2.0.0-alpha.1+unknown"
|
Loading…
Add table
Add a link
Reference in a new issue