forked from TrueCloudLab/frostfs-node
[#725] Simplify Makefile a little
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
03b5aad2e4
commit
0a130177d6
1 changed files with 8 additions and 12 deletions
20
Makefile
20
Makefile
|
@ -10,12 +10,11 @@ HUB_IMAGE ?= nspccdev/neofs
|
||||||
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
||||||
|
|
||||||
GO_VERSION ?= 1.16
|
GO_VERSION ?= 1.16
|
||||||
|
ARCH = amd64
|
||||||
|
|
||||||
BIN = bin
|
BIN = bin
|
||||||
DIRS = $(BIN)
|
|
||||||
|
|
||||||
RELEASE = release
|
RELEASE = release
|
||||||
ARCH = amd64
|
DIRS = $(BIN) $(RELEASE)
|
||||||
|
|
||||||
# List of binaries to build.
|
# List of binaries to build.
|
||||||
CMDS = $(notdir $(basename $(wildcard cmd/*)))
|
CMDS = $(notdir $(basename $(wildcard cmd/*)))
|
||||||
|
@ -42,16 +41,13 @@ $(DIRS):
|
||||||
@echo "⇒ Ensure dir: $@"
|
@echo "⇒ Ensure dir: $@"
|
||||||
@mkdir -p $@
|
@mkdir -p $@
|
||||||
|
|
||||||
# Directory for release files
|
|
||||||
$(RELEASE):
|
|
||||||
@echo "⇒ Ensure dir: $@"
|
|
||||||
@mkdir -p $@
|
|
||||||
|
|
||||||
# Prepare binaries and archives for release
|
# Prepare binaries and archives for release
|
||||||
prepare-release: $(RELEASE) docker/all
|
.ONESHELL:
|
||||||
@for file in $$(find $(BIN) -name 'neofs-*' -printf "%f\n"); do \
|
prepare-release: docker/all
|
||||||
cp $(BIN)/$$file $(RELEASE)/$$file-$(ARCH) && \
|
@for file in `ls -1 $(BIN)/neofs-*`; do
|
||||||
tar -czf $(RELEASE)/$$file-$(ARCH).tar.gz $(RELEASE)/$$file-$(ARCH) ; \
|
cp $$file $(RELEASE)/`basename $$file`-$(ARCH)
|
||||||
|
strip $(RELEASE)/`basename $$file`-$(ARCH)
|
||||||
|
tar -czf $(RELEASE)/`basename $$file`-$(ARCH).tar.gz $(RELEASE)/`basename $$file`-$(ARCH)
|
||||||
done
|
done
|
||||||
|
|
||||||
# Pull go dependencies
|
# Pull go dependencies
|
||||||
|
|
Loading…
Reference in a new issue