-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 820 Bytes
/
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
.DEFAULT_GOAL := build
SLIPROAD_VERSION := 2.0.0
# Workaround for CircleCI Docker image and mkdir.
SHELL := /bin/bash
make_build_dir:
mkdir -p build/{bin,assets,tars}
build: make_build_dir
go build -o build/bin/sliproad
pi: make_build_dir
env GOOS=linux GOARCH=arm GOARM=5 go build -o build/bin/sliproad-arm
small: make_build_dir
go build -o build/bin/sliproad -ldflags="-s -w"
small_pi: make_build_dir
env GOOS=linux GOARCH=arm GOARM=5 go build -o build/bin/sliproad-arm -ldflags="-s -w"
run:
go run webserver.go
test:
go test ./... -cover
dist: clean make_build_dir small small_pi
tar -czf build/tars/sliproad-$(SLIPROAD_VERSION)-arm.tar.gz build/bin/sliproad-arm README.md LICENSE
tar -czf build/tars/sliproad-$(SLIPROAD_VERSION)-x86.tar.gz build/bin/sliproad README.md LICENSE
clean:
rm -rf build