forked from trivago/gollum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (39 loc) · 1.35 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
.PHONY: all clean freebsd linux mac pi win aws current vendor test
BUILD_FLAGS=GO15VENDOREXPERIMENT=1 GORACE="halt_on_error=0" GOGC=off
clean:
@rm -f ./gollum
@rm -f ./dist/gollum_*.zip
@go clean
linux:
@echo "Building for Linux"
@GOOS=linux GOARCH=amd64 $(BUILD_FLAGS) go build -o gollum
@zip dist/gollum_linux.zip gollum config/*.conf
mac:
@echo "Building for MacOS X"
@GOOS=darwin GOARCH=amd64 $(BUILD_FLAGS) go build -o gollum
@zip dist/gollum_mac.zip gollum config/*.conf
freebsd:
@echo "Building for FreeBSD"
@GOOS=freebsd GOARCH=amd64 $(BUILD_FLAGS) go build -o gollum
@zip dist/gollum_freebsd.zip gollum config/*.conf
win:
@echo "Building for Windows"
@GOOS=windows GOARCH=amd64 $(BUILD_FLAGS) go build -o gollum
@zip dist/gollum_win.zip gollum config/*.conf
pi:
@echo "Building for Raspberry Pi"
@GOOS=linux GOARCH=arm $(BUILD_FLAGS) go build -o gollum
@zip dist/gollum_pi.zip gollum config/*.conf
aws:
@echo "Building for AWS"
@GOOS=linux GOARCH=amd64 $(BUILD_FLAGS) go build -o gollum
@zip -j dist/gollum_aws.zip gollum config/kinesis.conf dist/Procfile
current:
@$(BUILD_FLAGS) go build
vendor:
@go get -u github.com/FiloSottile/gvt
@gvt update -all -precaire
test:
@$(BUILD_FLAGS) go test -cover -v -timeout 10s -race $$(go list ./...|grep -v vendor)
all: clean freebsd linux mac pi win aws current
.DEFAULT_GOAL := current