-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (39 loc) · 919 Bytes
/
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
IMG ?= ghostbaby/cfs-broker:v0.0.2
TARGET = cfs-broker
all: $(TARGET)
$(TARGET):
go build -ldflags "-s -w" -o bin/$@
init:
swag init
run:
go run main.go -config config.json
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cfs-broker
upx cfs-broker
docker build -t $(IMG) .
push:
docker push $(IMG)
ci: build push
cd:
kubectl config use-context aliqa
kubectl apply -f ./contrib
del:
kubectl config use-context aliqa
kubectl delete -f ./contrib
roll:
kubectl config use-context aliqa
kubectl -n cfs patch ds cfs-broker --patch "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}"
deploy: ci cd roll
rollout:ci roll
# Run go fmt against code
fmt:
go fmt ./...
# Run go vet against code
vet:
go vet ./...
test: fmt vet
go test ./... -coverprofile cover.out
TARGET = phantom-runtime
all: $(TARGET)
$(TARGET):
go build -ldflags "-s -w" -o bin/$@