package/docker-cli: fix version ldflags
authorChristian Stewart <christian@paral.in>
Mon, 31 Aug 2020 01:07:54 +0000 (18:07 -0700)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 1 Sep 2020 20:20:34 +0000 (22:20 +0200)
The variables for the "docker version" output are located at
$(DOCKER_CLI_GOMOD)/cli/version - correct the path to these in the ldflags to
fix the following "unknown" lines in "docker version" output:

Client:
 Version:           unknown-version
 Git commit:        unknown-commit
 Built:             unknown-buildtime

Signed-off-by: Christian Stewart <christian@paral.in>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/docker-cli/docker-cli.mk

index fd96ff9f351dec977cdf8564fe60ffc045edc5d9..8607425efa8f3c7d3af558c710acecc1cfe04a5b 100644 (file)
@@ -17,8 +17,8 @@ DOCKER_CLI_BUILD_TARGETS = cmd/docker
 DOCKER_CLI_GOMOD = github.com/docker/cli
 
 DOCKER_CLI_LDFLAGS = \
-       -X $(DOCKER_CLI_GOMOD)/cli.GitCommit=$(DOCKER_CLI_VERSION) \
-       -X $(DOCKER_CLI_GOMOD)/cli.Version=$(DOCKER_CLI_VERSION)
+       -X $(DOCKER_CLI_GOMOD)/cli/version.GitCommit=$(DOCKER_CLI_VERSION) \
+       -X $(DOCKER_CLI_GOMOD)/cli/version.Version=$(DOCKER_CLI_VERSION)
 
 ifeq ($(BR2_PACKAGE_DOCKER_CLI_STATIC),y)
 DOCKER_CLI_LDFLAGS += -extldflags '-static'