-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (19 loc) · 747 Bytes
/
Makefile
File metadata and controls
24 lines (19 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
CONTAINER_TOOL ?= docker
USER_ID := $(shell id -u)
GROUP_ID := $(shell id -g)
TAG ?= $(shell git describe --dirty --long --always)
PLATFORMS ?= linux/arm64,linux/amd64
.PHONY: build clean verify-tool
.DEFAULT_GOAL: build
build:
go mod tidy
go mod verify
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -ldflags "-extldflags '-static'" -o ./dist/discovery-handler ./cmd/secure-http-discovery-handler
clean:
@rm -rf dist
verify-tool:
go mod tidy
go mod verify
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -ldflags "-extldflags '-static'" -o ./dist/dice-verify ./cmd/verify-tool
image:
$(CONTAINER_TOOL) buildx build --platform $(PLATFORMS) --push -t harbor.nbfc.io/nubificus/secure-http-discovery-handler:$(TAG) -f Dockerfile .