-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
29 lines (21 loc) · 938 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
SHOULDBEE_ENV := -e SHOULDBEE_API_URL=$(SHOULDBEE_API_URL) -e SHOULDBEE_USERNAME=$(SHOULDBEE_USERNAME) -e SHOULDBEE_PASSWORD=$(SHOULDBEE_PASSWORD)
GO := sudo docker run -i --rm --net host -v `pwd`:/vagrant -w /vagrant $(SHOULDBEE_ENV) shouldbee/go go
GOM := sudo docker run -it --rm --net host -v `pwd`:/vagrant -w /vagrant $(SHOULDBEE_ENV) shouldbee/go bin/gom
GOX := sudo docker run -it --rm --net host -v `pwd`:/vagrant -w /vagrant/src shouldbee/go /vagrant/bin/gom exec gox
GOPATH := ${PWD}/_vendor:${GOPATH}
export GOPATH
# how to pass args:
# make ARGS="run"
run: fmt
$(GOM) run src/proxy/*.go ${ARGS}
install:
$(GOM) install
fmt:
$(GO) fmt ./...
test: assets fmt
$(GOM) run src/*.go --debug run
build: fmt
$(GOX) -os="linux darwin windows" -arch="386 amd64" -output="/vagrant/build/{{.OS}}-{{.Arch}}/html2pdf" -ldflags "-X main.version '`$(VERSION)`'"
deploy:
cp -r build deploy/
./bin/make-formula.sh