-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (40 loc) · 1.34 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
GO_SOURCES=$(shell find ./ -type f -name '*.go')
BINARY=harbormaster
MAC_OS_X_ZIP=harbormaster-macosx.zip
AZKABAN_VERSION=3.47.0
AZKABAN_ZIP=azkaban-$(AZKABAN_VERSION).tar.gz
AZKABAN_DOWNLOAD=https://github.com/azkaban/azkaban/archive/$(AZKABAN_VERSION).tar.gz
AZKABAN_DIR=azkaban-$(AZKABAN_VERSION)
AZKABAN_SOLO_SERVER=$(AZKABAN_DIR)/azkaban-solo-server/build/install/azkaban-solo-server
.PHONY:
all: $(BINARY)
.PHONY:
install: $(BINARY)
go install .
$(BINARY): $(GO_SOURCES)
go build ./
.PHONY:
test:
go test -v github.com/ilikeorangutans/harbormaster/...
.PHONY:
clean:
-rm $(BINARY)
-rm -rf dist
.PHONY:
dist-all: dist/harbormaster-darwin.zip dist/harbormaster-linux.zip dist/harbormaster-windows.zip
dist/harbormaster-%.zip: dist/%/harbormaster
cd dist/$* && zip -9 ../harbormaster-$*.zip harbormaster
dist/%/harbormaster: $(GO_SOURCES)
mkdir -vp dist/$*
GOOS=$* GOARCH=amd64 go build -o dist/$*/harbormaster
.PHONY:
start-azkaban: $(AZKABAN_DIR)
cd $(AZKABAN_DIR)/azkaban-solo-server/build/install/azkaban-solo-server && ./bin/start-solo.sh
.PHONY:
stop-azkaban: $(AZKABAN_DIR)
cd $(AZKABAN_DIR)/azkaban-solo-server/build/install/azkaban-solo-server && ./bin/shutdown-solo.sh
$(AZKABAN_DIR): $(AZKABAN_ZIP)
tar xzf $(AZKABAN_ZIP)
cd $(AZKABAN_DIR) && ./gradlew distTar -x check
$(AZKABAN_ZIP):
curl -L $(AZKABAN_DOWNLOAD) -o $(AZKABAN_ZIP)