fix Makefile build target
This commit is contained in:
parent
842cb5ad2c
commit
4e23b8de1c
8
Makefile
8
Makefile
@ -1,7 +1,7 @@
|
||||
.PHONY: all test build docker install clean proto check_protoc
|
||||
|
||||
CMD_NAME := demo-app # TODO: Update app name
|
||||
VERSION ?= development # Default to "development" if VERSION is not set
|
||||
CMD_NAME := demo-app
|
||||
VERSION ?= development
|
||||
API_DIR := api/
|
||||
PROTO_DIRS := $(wildcard proto/demo/app/*) # TODO: Update path (probably not demo)
|
||||
PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64
|
||||
@ -28,7 +28,9 @@ build: test
|
||||
OS=$$(echo $$platform | cut -d/ -f1); \
|
||||
ARCH=$$(echo $$platform | cut -d/ -f2); \
|
||||
OUTPUT="$(OUTPUT_DIR)/$(CMD_NAME)-$$OS-$$ARCH"; \
|
||||
GOOS=$$OS GOARCH=$$ARCH go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o $$OUTPUT; \
|
||||
mkdir -vp $(OUTPUT_DIR); \
|
||||
echo "Building for $$platform into $$OUTPUT"; \
|
||||
GOOS=$$OS GOARCH=$$ARCH go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o $$OUTPUT .; \
|
||||
echo "Built $$OUTPUT"; \
|
||||
done
|
||||
go build -ldflags "-X $(VER_PKG)=$(VERSION)" -o bin/${CMD_NAME}
|
||||
|
Loading…
x
Reference in New Issue
Block a user