Move the hashing of files to its own target
So we can use it at will Signed-off-by: Eli Uriegas <eli.uriegas@docker.com> (cherry picked from commit 533a843393bd7c3674074ec9af73c8e666fc7484) Conflicts: components/packaging/static/Makefile Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
This commit is contained in:
@@ -4,8 +4,10 @@ CLI_DIR:=$(CURDIR)/../../cli
|
||||
ENGINE_VER=$(shell cat $(ENGINE_DIR)/VERSION)
|
||||
VERSION=$(shell cat $(ENGINE_DIR)/VERSION)
|
||||
CHOWN=docker run --rm -v $(CURDIR):/v -w /v alpine chown
|
||||
HASH_CMD=docker run -v $(CURDIR):/sum -it -w /sum debian:jessie bash hash_files
|
||||
DIR_TO_HASH:=build/linux
|
||||
|
||||
.PHONY: help clean static static-linux cross-mac cross-win cross-arm static-cli static-engine cross-all-cli cross-win-engine
|
||||
.PHONY: help clean static static-linux cross-mac cross-win cross-arm static-cli static-engine cross-all-cli cross-win-engine hash_files
|
||||
|
||||
help: ## show make targets
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
@@ -24,6 +26,10 @@ static-linux: static-cli static-engine ## create tgz with linux x86_64 client an
|
||||
done
|
||||
tar -C build/linux -c -z -f build/linux/docker-$(VERSION).tgz docker
|
||||
|
||||
hash_files:
|
||||
@echo "Hashing directory $(DIR_TO_HASH)"
|
||||
$(HASH_CMD) "$(DIR_TO_HASH)"
|
||||
|
||||
cross-mac: cross-all-cli ## create tgz with darwin x86_64 client only
|
||||
mkdir -p build/mac/docker
|
||||
cp $(CLI_DIR)/build/docker-darwin-amd64 build/mac/docker/docker
|
||||
|
||||
Reference in New Issue
Block a user