[#46] Add buiding of authmate's binaries to makefile
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
50e4eb3b43
commit
2847447813
1 changed files with 13 additions and 1 deletions
14
Makefile
14
Makefile
|
@ -9,10 +9,15 @@ HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
|||
BINDIR = bin
|
||||
BIN = "$(BINDIR)/$(BIN_NAME)"
|
||||
|
||||
AUTHMATE_BIN_NAME=authmate
|
||||
AUTHMATE_HUB_IMAGE="nspccdev/$(AUTHMATE_BIN_NAME)"
|
||||
AUTHMATE_HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
||||
AUTHMATE_BIN = "$(BINDIR)/$(AUTHMATE_BIN_NAME)"
|
||||
|
||||
.PHONY: help all dep clean format test cover lint docker/lint image-push image dirty-image
|
||||
|
||||
# Make all binaries
|
||||
all: $(BIN)
|
||||
all: $(BIN) $(AUTHMATE_BIN)
|
||||
|
||||
$(BIN): $(BINDIR) dep
|
||||
@echo "⇒ Build $@"
|
||||
|
@ -21,6 +26,13 @@ $(BIN): $(BINDIR) dep
|
|||
-ldflags "-X main.Version=$(VERSION)" \
|
||||
-o $@ ./cmd/gate
|
||||
|
||||
$(AUTHMATE_BIN): $(BINDIR) dep
|
||||
@echo "⇒ Build $@"
|
||||
CGO_ENABLED=0 \
|
||||
go build -v -trimpath \
|
||||
-ldflags "-X main.Version=$(VERSION)" \
|
||||
-o $@ ./cmd/authmate
|
||||
|
||||
$(BINDIR):
|
||||
@echo "⇒ Ensure dir: $@"
|
||||
@mkdir -p $@
|
||||
|
|
Loading…
Reference in a new issue