| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | LDFLAGS="${LDFLAGS} \ |
| 4 | -X \"github.com/docker/docker/dockerversion.Version=${VERSION}\" \ |
| 5 | -X \"github.com/docker/docker/dockerversion.GitCommit=${GITCOMMIT}\" \ |
| 6 | -X \"github.com/docker/docker/dockerversion.BuildTime=${BUILDTIME}\" \ |
| 7 | -X \"github.com/docker/docker/dockerversion.PlatformName=${PLATFORM}\" \ |
| 8 | -X \"github.com/docker/docker/dockerversion.ProductName=${PRODUCT}\" \ |
| 9 | -X \"github.com/docker/docker/dockerversion.DefaultProductLicense=${DEFAULT_PRODUCT_LICENSE}\" " |
| 10 | |
| 11 | # Compile the Windows resources into the sources |
| 12 | if [ "$(go env GOOS)" = "windows" ]; then |
| 13 | if [ ! -x "$(command -v go-winres)" ]; then |
| 14 | >&2 echo "go-winres not found, skipping manifesting binary" |
| 15 | else |
| 16 | ( |
| 17 | . hack/make/.mkwinres |
| 18 | go generate -v "${GO_PACKAGE}" |
| 19 | ) |
| 20 | fi |
| 21 | fi |