-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (28 loc) · 955 Bytes
/
Makefile
File metadata and controls
41 lines (28 loc) · 955 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Output: build/proxy.zip, build/authorizer.zip
GOOS := linux
GOARCH := arm64
BUILD := build
PROXY := $(BUILD)/proxy
AUTH := $(BUILD)/authorizer
.PHONY: all clean build proxy authorizer zips changelog version
all: zips
zips: $(BUILD)/proxy.zip $(BUILD)/authorizer.zip
$(BUILD)/proxy.zip: $(PROXY)/bootstrap
cd $(PROXY) && zip -q ../proxy.zip bootstrap
$(BUILD)/authorizer.zip: $(AUTH)/bootstrap
cd $(AUTH) && zip -q ../authorizer.zip bootstrap
$(PROXY)/bootstrap:
mkdir -p $(PROXY)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags="-s -w" -o $(PROXY)/bootstrap ./cmd/proxy
$(AUTH)/bootstrap:
mkdir -p $(AUTH)
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags="-s -w" -o $(AUTH)/bootstrap ./cmd/authorizer
build: $(PROXY)/bootstrap $(AUTH)/bootstrap
proxy: $(PROXY)/bootstrap
authorizer: $(AUTH)/bootstrap
clean:
rm -rf $(BUILD)
changelog:
git-cliff -o CHANGELOG.md
version:
@git-cliff --bumped-version 2>/dev/null || echo "0.1.0"