2017-04-25 19:57:06 +03:00
|
|
|
#
|
2017-05-09 19:38:23 +03:00
|
|
|
# github.com/docker/cli
|
2017-04-25 19:57:06 +03:00
|
|
|
#
|
2017-05-14 20:24:10 +03:00
|
|
|
all: binary
|
|
|
|
|
2017-04-25 19:57:06 +03:00
|
|
|
# remove build artifacts
|
2017-05-10 00:29:14 +03:00
|
|
|
.PHONY: clean
|
2017-04-25 19:57:06 +03:00
|
|
|
clean:
|
2017-05-11 04:24:32 +03:00
|
|
|
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2017-04-28 01:57:35 +03:00
|
|
|
# run go test
|
|
|
|
# the "-tags daemon" part is temporary
|
2017-05-10 00:29:14 +03:00
|
|
|
.PHONY: test
|
2017-04-28 01:57:35 +03:00
|
|
|
test:
|
2017-05-11 04:24:32 +03:00
|
|
|
./scripts/test/unit $(shell go list ./... | grep -v '/vendor/')
|
2017-04-28 01:57:35 +03:00
|
|
|
|
2017-05-18 11:48:24 +03:00
|
|
|
.PHONY: test-coverage
|
|
|
|
test-coverage:
|
2017-05-11 04:24:32 +03:00
|
|
|
./scripts/test/unit-with-coverage $(shell go list ./... | grep -v '/vendor/')
|
2017-05-18 11:48:24 +03:00
|
|
|
|
2017-05-10 00:29:14 +03:00
|
|
|
.PHONY: lint
|
2017-05-02 22:10:03 +03:00
|
|
|
lint:
|
2017-05-17 19:08:50 +03:00
|
|
|
gometalinter --config gometalinter.json ./...
|
2017-05-02 22:10:03 +03:00
|
|
|
|
2017-05-12 01:52:17 +03:00
|
|
|
.PHONY: binary
|
|
|
|
binary:
|
2017-05-17 19:08:50 +03:00
|
|
|
@echo "WARNING: binary creates a Linux executable. Use cross for macOS or Windows."
|
|
|
|
./scripts/build/binary
|
2017-05-12 01:52:17 +03:00
|
|
|
|
2017-05-10 00:29:14 +03:00
|
|
|
.PHONY: cross
|
2017-05-12 01:52:17 +03:00
|
|
|
cross:
|
2017-05-17 19:08:50 +03:00
|
|
|
./scripts/build/cross
|
2017-05-02 23:40:29 +03:00
|
|
|
|
2017-05-12 01:52:17 +03:00
|
|
|
.PHONY: dynbinary
|
|
|
|
dynbinary:
|
2017-05-17 19:08:50 +03:00
|
|
|
./scripts/build/dynbinary
|
2017-05-12 01:52:17 +03:00
|
|
|
|
2017-05-16 00:00:35 +03:00
|
|
|
.PHONY: watch
|
|
|
|
watch:
|
2017-05-17 19:08:50 +03:00
|
|
|
./scripts/test/watch
|
2017-05-16 00:00:35 +03:00
|
|
|
|
2017-05-17 19:08:50 +03:00
|
|
|
# Check vendor matches vendor.conf
|
2017-05-02 23:40:29 +03:00
|
|
|
vendor: vendor.conf
|
2017-05-17 19:08:50 +03:00
|
|
|
vndr 2> /dev/null
|
|
|
|
scripts/validate/check-git-diff vendor
|
2017-05-09 22:37:22 +03:00
|
|
|
|
2017-05-11 04:24:32 +03:00
|
|
|
## generate man pages from go source and markdown
|
|
|
|
.PHONY: manpages
|
|
|
|
manpages:
|
2017-06-06 07:59:50 +03:00
|
|
|
scripts/docs/generate-man.sh
|
2017-05-11 04:24:32 +03:00
|
|
|
|
|
|
|
## generate documentation YAML files consumed by docs repo
|
|
|
|
.PHONY: yamldocs
|
|
|
|
yamldocs:
|
|
|
|
scripts/docs/generate-yaml.sh
|
|
|
|
|
2017-05-09 22:37:22 +03:00
|
|
|
cli/compose/schema/bindata.go: cli/compose/schema/data/*.json
|
|
|
|
go generate github.com/docker/cli/cli/compose/schema
|
|
|
|
|
|
|
|
compose-jsonschema: cli/compose/schema/bindata.go
|
2017-05-17 19:08:50 +03:00
|
|
|
scripts/validate/check-git-diff cli/compose/schema/bindata.go
|