From 0a130177d6b5dd67dc8685edfb4feeab63a15d19 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Wed, 15 Sep 2021 17:18:44 +0300 Subject: [PATCH] [#725] Simplify Makefile a little Signed-off-by: Stanislav Bogatyrev --- Makefile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 13275c4d..e2901bbc 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,11 @@ HUB_IMAGE ?= nspccdev/neofs HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" GO_VERSION ?= 1.16 +ARCH = amd64 BIN = bin -DIRS = $(BIN) - RELEASE = release -ARCH = amd64 +DIRS = $(BIN) $(RELEASE) # List of binaries to build. CMDS = $(notdir $(basename $(wildcard cmd/*))) @@ -42,16 +41,13 @@ $(DIRS): @echo "⇒ Ensure dir: $@" @mkdir -p $@ -# Directory for release files -$(RELEASE): - @echo "⇒ Ensure dir: $@" - @mkdir -p $@ - # Prepare binaries and archives for release -prepare-release: $(RELEASE) docker/all - @for file in $$(find $(BIN) -name 'neofs-*' -printf "%f\n"); do \ - cp $(BIN)/$$file $(RELEASE)/$$file-$(ARCH) && \ - tar -czf $(RELEASE)/$$file-$(ARCH).tar.gz $(RELEASE)/$$file-$(ARCH) ; \ +.ONESHELL: +prepare-release: docker/all + @for file in `ls -1 $(BIN)/neofs-*`; do + cp $$file $(RELEASE)/`basename $$file`-$(ARCH) + strip $(RELEASE)/`basename $$file`-$(ARCH) + tar -czf $(RELEASE)/`basename $$file`-$(ARCH).tar.gz $(RELEASE)/`basename $$file`-$(ARCH) done # Pull go dependencies