1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-27 13:48:56 +08:00

34 lines
1.0 KiB
Makefile
Raw Normal View History

PACKAGES := gobot gobot/api gobot/platforms/firmata/client gobot/platforms/intel-iot/edison gobot/sysfs $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
.PHONY: test cover robeaux
2014-07-10 11:13:32 -07:00
2014-06-11 20:10:46 -07:00
test:
2014-06-23 18:57:41 -07:00
for package in $(PACKAGES) ; do \
go test -a github.com/hybridgroup/$$package ; \
2014-06-23 18:57:41 -07:00
done ; \
2014-06-11 20:10:46 -07:00
cover:
2014-12-19 11:26:44 -08:00
echo "mode: set" > profile.cov ; \
2014-06-11 20:10:46 -07:00
for package in $(PACKAGES) ; do \
go test -a -coverprofile=tmp.cov github.com/hybridgroup/$$package ; \
2014-12-19 11:26:44 -08:00
cat tmp.cov | grep -v "mode: set" >> profile.cov ; \
2014-06-11 20:10:46 -07:00
done ; \
rm tmp.cov ; \
2014-07-01 23:10:12 -07:00
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 ; \
npm install robeaux ; \
cp -r node_modules/robeaux robeaux-tmp ; \
2014-07-10 11:35:00 -07:00
cd robeaux-tmp ; \
rm Makefile package.json README.markdown ; \
2014-07-10 11:13:32 -07:00
touch css/fonts.css ; \
echo "Updating robeaux..." ; \
2014-07-10 11:35:00 -07:00
go-bindata -pkg="robeaux" -o robeaux.go -ignore=\\.git ./... ; \
mv robeaux.go ../robeaux ; \
2014-07-01 23:10:12 -07:00
cd .. ; \
2014-07-10 11:35:00 -07:00
rm -rf robeaux-tmp/ ; \
rm -rf node_modules/ ; \
2014-07-10 11:35:00 -07:00
go fmt ./robeaux/robeaux.go ; \