Move version.go in its own package…

… making it possible to use in other packages ; and thus in the
User-Agent header for the docker client.

Also removing the dockerverion hack as it's not required anymore.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2016-07-21 16:33:49 +02:00
parent 4c54a003fa
commit 87a4d73556
No known key found for this signature in database
GPG key ID: 083CC6FD6EB699A3
6 changed files with 18 additions and 31 deletions

View file

@ -26,4 +26,4 @@ if [ -z "$DATE" ]; then
fi
# Build binaries
CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w -X main.Version=$VERSION -X main.Codename=$CODENAME -X main.BuildDate=$DATE" -a -installsuffix nocgo -o dist/traefik .
CGO_ENABLED=0 GOGC=off go build $FLAGS -ldflags "-s -w -X version.Version=$VERSION -X version.Codename=$CODENAME -X version.BuildDate=$DATE" -a -installsuffix nocgo -o dist/traefik .