dockerversion placeholder for library-import
- Move autogen/dockerversion to version - Update autogen and "builds" to use this package and a build flag Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
ed69ef01ee
commit
c2d5c29437
1 changed files with 3 additions and 3 deletions
|
@ -20,10 +20,10 @@ import (
|
||||||
"github.com/docker/distribution/registry/api/v2"
|
"github.com/docker/distribution/registry/api/v2"
|
||||||
"github.com/docker/distribution/registry/client"
|
"github.com/docker/distribution/registry/client"
|
||||||
"github.com/docker/distribution/registry/client/transport"
|
"github.com/docker/distribution/registry/client/transport"
|
||||||
"github.com/docker/docker/autogen/dockerversion"
|
|
||||||
"github.com/docker/docker/pkg/parsers/kernel"
|
"github.com/docker/docker/pkg/parsers/kernel"
|
||||||
"github.com/docker/docker/pkg/tlsconfig"
|
"github.com/docker/docker/pkg/tlsconfig"
|
||||||
"github.com/docker/docker/pkg/useragent"
|
"github.com/docker/docker/pkg/useragent"
|
||||||
|
"github.com/docker/docker/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -39,9 +39,9 @@ var dockerUserAgent string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
httpVersion := make([]useragent.VersionInfo, 0, 6)
|
httpVersion := make([]useragent.VersionInfo, 0, 6)
|
||||||
httpVersion = append(httpVersion, useragent.VersionInfo{"docker", dockerversion.VERSION})
|
httpVersion = append(httpVersion, useragent.VersionInfo{"docker", version.VERSION})
|
||||||
httpVersion = append(httpVersion, useragent.VersionInfo{"go", runtime.Version()})
|
httpVersion = append(httpVersion, useragent.VersionInfo{"go", runtime.Version()})
|
||||||
httpVersion = append(httpVersion, useragent.VersionInfo{"git-commit", dockerversion.GITCOMMIT})
|
httpVersion = append(httpVersion, useragent.VersionInfo{"git-commit", version.GITCOMMIT})
|
||||||
if kernelVersion, err := kernel.GetKernelVersion(); err == nil {
|
if kernelVersion, err := kernel.GetKernelVersion(); err == nil {
|
||||||
httpVersion = append(httpVersion, useragent.VersionInfo{"kernel", kernelVersion.String()})
|
httpVersion = append(httpVersion, useragent.VersionInfo{"kernel", kernelVersion.String()})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue