Files
docker-cli/components/cli/Makefile
Kenfe-Mickael Laventure bfb4425b6f Display proper version information
- The cli version defaults to "unknown-version" unless set via the VERSION env var
- The commit version can be overridden via GITCOMMIT env var
- The build time can be overridden via BUILDTIME env var

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: cf51bde7d9
Component: cli
2017-05-09 14:22:51 -07:00

35 lines
700 B
Makefile

#
# github.com/docker/cli
#
.PHONY: build clean test lint cross
# build the CLI
build: clean
@./scripts/build/binary
# remove build artifacts
clean:
@rm -rf ./build/*
# run go test
# the "-tags daemon" part is temporary
test:
@go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
# run linters
lint:
@gometalinter --config gometalinter.json ./...
# build the CLI for multiple architectures
cross: clean
@./scripts/build/cross
vendor: vendor.conf
@vndr 2> /dev/null
@if [ "`git status --porcelain -- vendor 2>/dev/null`" ]; then \
echo; echo "vendoring is wrong. These files were changed:"; \
echo; git status --porcelain -- vendor 2>/dev/null; \
echo; exit 1; \
fi;