From 18355074d73aa2a2866365b40252170899285f86 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Mon, 22 May 2017 15:11:53 -0700 Subject: [PATCH] Move the hashing of files to its own target So we can use it at will Signed-off-by: Eli Uriegas (cherry picked from commit 533a843393bd7c3674074ec9af73c8e666fc7484) Conflicts: components/packaging/static/Makefile Signed-off-by: Andrew Hsu --- components/packaging/static/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/packaging/static/Makefile b/components/packaging/static/Makefile index 14711884eb..1c8d25d952 100644 --- a/components/packaging/static/Makefile +++ b/components/packaging/static/Makefile @@ -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