forked from jitsucom/jitsu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (27 loc) · 792 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
33
34
# Go parameters
#GOBUILD_CMD=GOOS=linux GOARCH=amd64 go build
export PATH := $(shell go env GOPATH)/bin:$(PATH)
commit=`git rev-parse --short HEAD`
built_at=`date -u +%FT%T.000000Z`
tag=`git describe --tags`
all: clean assemble
assemble: backend js
mkdir -p ./build/dist/web
cp ./web/dist/web/* ./build/dist/web/
cp ./web/welcome.html ./build/dist/web/
mv eventnative ./build/dist/
backend:
echo "Using path $(PATH)"
go get -u github.com/mailru/easyjson/...
go mod tidy
go generate
go build -ldflags "-X main.commit=${commit} -X main.builtAt=${built_at} -X main.tag=${tag}" -o eventnative
js:
npm i --prefix ./web && npm run build --prefix ./web
test_backend:
go test -failfast -v -parallel=1 ./...
clean:
go clean
rm -f $(APPLICATION)
rm -rf ./web/build
rm -rf ./build