-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (45 loc) · 1.62 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
SHELL=bash
VERSION=0.1.0
help:
@echo "Just run 'make all'."
@echo ""
@echo "You will need to have the DEV_REGISTRY variable set when doing this."
@echo ""
@echo "You can also 'make clean' to remove all the Docker-image stuff,"
@echo "or 'make clobber' to smite everything and completely start over."
.PHONY: help
registry-check:
@if [ -z "$(DEV_REGISTRY)" ]; then \
echo "DEV_REGISTRY must be set (e.g. DEV_REGISTRY=docker.io/myregistry)" >&2 ;\
exit 1; \
fi
.PHONY: registry-check
all: images cli
clean:
-rm -f linkerd-gamma
.PHONY: clean
clobber: clean
true
.PHONY: clobber
images image: registry-check
docker build -t $(DEV_REGISTRY)/linkerd-gamma:$(VERSION) .
.PHONY: images image
# This is just an alias
cli: linkerd-gamma
linkerd-gamma:
go build -o linkerd-gamma ./cmd/
.PHONY: cmd/linkerd-gamma
deploy: images k8s/faces-gui.yaml k8s/faces.yaml
kubectl create namespace faces || true
kubectl apply -n faces -f k8s
# @echo "You should now be able to open http://faces.example.com/ in your browser."
# Sometimes we have a file-target that we want Make to always try to
# re-generate (such as compiling a Go program; we would like to let
# `go install` decide whether it is up-to-date or not, rather than
# trying to teach Make how to do that). We could mark it as .PHONY,
# but that tells Make that "this isn't a real file that I expect to
# ever exist", which has a several implications for Make, most of
# which we don't want. Instead, we can have them *depend* on a .PHONY
# target (which we'll name "FORCE"), so that they are always
# considered out-of-date by Make, but without being .PHONY themselves.
.PHONY: FORCE