cmd/buildx: add empty by default experimental variable

To guard this Docker CLI plugin with docker's experimental CLI config,
buildx needs to be built with `go build -ldflags "-X main.experimental=1"`

Signed-off-by: Tibor Vass <tibor@docker.com>
pull/81/head
Tibor Vass 6 years ago
parent fb9cf7720a
commit 695034153a

@ -16,6 +16,8 @@ import (
_ "github.com/docker/buildx/driver/docker-container"
)
var experimental string
func main() {
if os.Getenv("DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND") == "" {
if len(os.Args) < 2 || os.Args[1] != manager.MetadataSubcommandName {
@ -41,5 +43,6 @@ func main() {
SchemaVersion: "0.1.0",
Vendor: "Docker Inc.",
Version: version.Version,
Experimental: experimental != "",
})
}

Loading…
Cancel
Save