-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (35 loc) · 1.07 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
bin-prep:
GO111MODULE=off go get -u github.com/kevinburke/go-bindata/...
bin-migrations:
go-bindata -o data/migrate.go -prefix data/migrations/ data/migrations/
sed -i "s/package main/package data/" data/migrate.go
bin-dist:
go-bindata -o audiofile/assets.go -prefix dist/ dist/...
binaries:
$(MAKE) binary GOARCH=amd64 GOOS=linux
$(MAKE) binary GOARCH=amd64 GOOS=windows
$(MAKE) binary GOARCH=amd64 GOOS=darwin
$(MAKE) binary GOARCH=386 GOOS=linux
$(MAKE) binary GOARCH=386 GOOS=windows
binary: GOARCH?=amd64
binary: GOOS?=linux
binary:
go build -o build/audiofile.${GOARCH}-${GOOS} ./audiofile
if [ "${GOOS}" = "windows" ]; then \
mv build/audiofile.${GOARCH}-${GOOS} build/audiofile.${GOARCH}-${GOOS}.exe; \
fi
clean:
rm audiofile/assets.go
rm data/migrate.go
rm -r dist
# at this time, there's no watch enabled for the go binary
dev-be: bin-prep bin-migrations bin-dist install
audiofile
# serve is a watch task with built-in node server
dev-fe:
yarn serve
install:
yarn build
go install ./audiofile/
test: bin-migrations bin-dist install
go test -v -race ./...