-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
49 lines (35 loc) · 1.44 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
.PHONY : test build clean format
build-ui:
npm run --prefix dashboard/ui/ build
build: build-ui
go build github.com/telkomdev/tob/cmd/tob
# build for Apple's OSX 64
build-osx: build-ui
GOOS=darwin GOARCH=amd64 go build -ldflags '-s -w' -o tob github.com/telkomdev/tob/cmd/tob
# build for Apple's OSX 64 with Apple Chip
build-osx-arm: build-ui
GOOS=darwin GOARCH=arm64 go build -ldflags '-s -w' -o tob github.com/telkomdev/tob/cmd/tob
# build for Linux 64
build-linux: build-ui
GOOS=linux GOARCH=amd64 go build -ldflags '-s -w' -o tob github.com/telkomdev/tob/cmd/tob
# build for Windows 64
build-win: build-ui
GOOS=windows GOARCH=amd64 go build -ldflags '-s -w' -o tob.exe github.com/telkomdev/tob/cmd/tob
# Tob HTTP Agent
# build for Apple's OSX 64
build-http-agent-osx:
GOOS=darwin GOARCH=amd64 go build -ldflags '-s -w' -o tob-http-agent github.com/telkomdev/tob/cmd/tob-http-agent
# build for Apple's OSX 64
build-http-agent-osx-arm:
GOOS=darwin GOARCH=arm64 go build -ldflags '-s -w' -o tob-http-agent github.com/telkomdev/tob/cmd/tob-http-agent
# build for Linux 64
build-http-agent-linux:
GOOS=linux GOARCH=amd64 go build -ldflags '-s -w' -o tob-http-agent github.com/telkomdev/tob/cmd/tob-http-agent
test:
go test ./...
test-verbose:
go test -v ./...
format:
find . -name "*.go" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/volumes/*" | xargs gofmt -s -d -w
clean:
rm -f tob tob.exe tob-http-agent tob-http-agent.exe *.txt