forked from jumppad-labs/jumppad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (19 loc) · 915 Bytes
/
Makefile
File metadata and controls
28 lines (19 loc) · 915 Bytes
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
git_commit = $(shell git log -1 --pretty=format:"%H")
test_unit:
go test -v -race $(shell go list ./... | grep -v /functional_tests)
test_functional:
cd ./functional_tests && go test -v ./...
test: test_unit test_functional
# Run tests continually with a watcher
autotest:
filewatcher --idle-timeout 24h -x **/functional_tests gotestsum --format standard-verbose
build: build-darwin build-linux build-windows
build-darwin:
CGO_ENABLED=0 GOOS=darwin go build -ldflags "-X main.version=${git_commit}" -o bin/yard-darwin main.go
build-linux:
CGO_ENABLED=0 GOOS=linux go build -ldflags "-X main.version=${git_commit}" -o bin/yard-linux main.go
build-windows:
CGO_ENABLED=0 GOOS=windows go build -ldflags "-X main.version=${git_commit}" -o bin/yard-windows.exe main.go
install_local:
go build -ldflags "-X main.version=${git_commit}" -o bin/yard-dev main.go
sudo cp bin/yard-dev /usr/local/bin/yard-dev