-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
62 lines (44 loc) · 1.47 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: all
all: build codesign
.PHONY: codesign
codesign:
codesign --entitlements linux.entitlements -s - ./bin/linux || true
.PHONY: build
build:
GOOS=darwin go build -o bin/linux ./cmd/linux
test-build: build
cp bin/linux ~/mac/tmp
.PHONY: test-build
.PHONY: build-release
build-release: compile-release codesign
.PHONY: compile-release
compile-release:
go build -ldflags "-X main.Version=$$VERSION" -o bin/linux ./cmd/linux
.PHONY: cli-release
cli-release: build-release
gon -log-level=info ./gon.hcl
mv output/linux.zip output/linux-$$VERSION-$$(go env GOARCH).zip
.PHONY: os-release
os-release: binaries
cd os && sudo make release VERSION=$$VERSION PLATFORM=$$(go env GOARCH)
binaries: os/isle-guest os/isle-helper os/containerd-clog-logger
.PHONY: binaries
test-release: clean os/isle-guest os/isle-helper
cd os && sudo make release VERSION=0.0.0 PLATFORM=$$(go env GOARCH)
mv os/os-v0.0.0-$$(go env GOARCH).tar.gz ~/mac/tmp
clean:
rm -rf os/isle-guest os/isle-helper
.PHONY: release
release: cli-release os-release
os/isle-guest:
GOOS=linux CGO_ENABLED=0 go build -o os/isle-guest ./cmd/isle-guest
.PHONY: os/isle-guest
os/containerd-clog-logger:
GOOS=linux CGO_ENABLED=0 go build -o os/containerd-clog-logger ./pkg/clog/containerd-clog-logger
test-guest: os/isle-guest
cp os/isle-guest ~/mac/tmp
os/isle-helper:
GOOS=linux CGO_ENABLED=0 go build -o os/isle-helper ./cmd/isle-helper
.PHONY: os/isle-helper
test-helper: os/isle-helper
cp os/isle-helper ~/mac/tmp