Skip to content

Commit 818564a

Browse files
committed
cli/compose: use go1.16 native embed functionality for schemas
This allows us to drop the `//go:generate` and use of the github.com/mjibson/esc utility. worth noting that Go's native "embed" does not compress files. We could compress these files as part of a build / validate step (which would add some complexity when updating these files) if this is a concern, but not sure if the additional complexity is warranted. Comparing before/after sizes (see below); macOS: 54125840 - 54005264 = 120576 (+120.58 kB) Linux: 52393231 - 52277701 = 115530 (+115.53 kB) Before: ls -l build/ total 208736 lrwxr-xr-x 1 sebastiaan staff 19 Aug 15 09:36 docker@ -> docker-linux-amd64 -rwxr-xr-x 1 sebastiaan staff 54005264 Aug 15 09:35 docker-darwin-amd64* -rwxr-xr-x 1 sebastiaan staff 52277701 Aug 15 09:36 docker-linux-amd64* After: ls -l build/ total 208960 lrwxr-xr-x 1 sebastiaan staff 18 Aug 15 09:32 docker@ -> docker-linux-amd64 -rwxr-xr-x 1 sebastiaan staff 54125840 Aug 15 09:31 docker-darwin-amd64* -rwxr-xr-x 1 sebastiaan staff 52393231 Aug 15 09:32 docker-linux-amd64* Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 304a2dc commit 818564a

5 files changed

Lines changed: 5 additions & 672 deletions

File tree

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,8 @@ yamldocs: ## generate documentation YAML files consumed by docs repo
7171
help: ## print this help
7272
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
7373

74-
75-
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
76-
go generate github.com/docker/cli/cli/compose/schema
77-
78-
compose-jsonschema: cli/compose/schema/bindata.go ## generate compose-file schemas
79-
scripts/validate/check-git-diff cli/compose/schema/bindata.go
80-
8174
.PHONY: ci-validate
8275
ci-validate:
8376
time make -B vendor
84-
time make -B compose-jsonschema
8577
time make manpages
8678
time make yamldocs

0 commit comments

Comments
 (0)