forked from hybridgroup/gobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (29 loc) · 1.01 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
PACKAGES := gobot gobot/api $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
.PHONY: test cover robeaux
test:
for package in $(PACKAGES) ; do \
go test github.com/hybridgroup/$$package ; \
done ; \
cover:
echo "mode: count" > profile.cov ; \
for package in $(PACKAGES) ; do \
go test -covermode=count -coverprofile=tmp.cov github.com/hybridgroup/$$package ; \
cat tmp.cov | grep -v "mode: count" >> profile.cov ; \
done ; \
rm tmp.cov ; \
robeaux:
ifeq (,$(shell which go-bindata))
$(error robeaux not built! https://github.com/jteeuwen/go-bindata is required to build robeaux assets )
endif
cd api ; \
git clone --depth 1 git://github.com/hybridgroup/robeaux.git ; \
cd robeaux ; \
rm fonts/* ; \
rm Makefile package.json README.markdown robeaux.gemspec css/fonts.css ; \
touch css/fonts.css ; \
echo "Updating robeaux to $(shell git rev-parse HEAD)" ; \
go-bindata -pkg="api" -o robeaux.go -ignore=\\.git ./... ; \
mv robeaux.go .. ; \
cd .. ; \
rm -rf robeaux/ ; \
go fmt ./robeaux.go ; \