2014-10-30 16:06:04 -07:00
|
|
|
PACKAGES := gobot gobot/api gobot/platforms/intel-iot/edison gobot/sysfs $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
|
2014-07-18 14:18:01 -06:00
|
|
|
.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 \
|
2014-07-03 19:14:04 -07:00
|
|
|
go test github.com/hybridgroup/$$package ; \
|
2014-06-23 18:57:41 -07:00
|
|
|
done ; \
|
2014-07-18 14:18:01 -06:00
|
|
|
|
2014-06-11 20:10:46 -07:00
|
|
|
cover:
|
|
|
|
echo "mode: count" > profile.cov ; \
|
|
|
|
for package in $(PACKAGES) ; do \
|
2014-07-03 19:14:04 -07:00
|
|
|
go test -covermode=count -coverprofile=tmp.cov github.com/hybridgroup/$$package ; \
|
2014-06-11 20:10:46 -07:00
|
|
|
cat tmp.cov | grep -v "mode: count" >> profile.cov ; \
|
|
|
|
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 ; \
|
2014-07-10 11:35:00 -07:00
|
|
|
git clone --depth 1 git://github.com/hybridgroup/robeaux.git robeaux-tmp; \
|
|
|
|
cd robeaux-tmp ; \
|
2014-07-10 11:13:32 -07:00
|
|
|
rm fonts/* ; \
|
2014-08-04 12:01:33 -07:00
|
|
|
rm -r test/* ; \
|
2014-07-10 11:13:32 -07:00
|
|
|
rm Makefile package.json README.markdown robeaux.gemspec css/fonts.css ; \
|
|
|
|
touch css/fonts.css ; \
|
2014-07-01 23:10:12 -07:00
|
|
|
echo "Updating robeaux to $(shell git rev-parse HEAD)" ; \
|
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/ ; \
|
|
|
|
go fmt ./robeaux/robeaux.go ; \
|
2014-07-18 14:18:01 -06:00
|
|
|
|