2014-07-04 10:14:04 +08:00
|
|
|
PACKAGES := gobot gobot/api $(shell ls ./platforms | sed -e 's/^/gobot\/platforms\//')
|
2014-06-12 11:10:46 +08:00
|
|
|
|
|
|
|
test:
|
2014-06-24 09:57:41 +08:00
|
|
|
for package in $(PACKAGES) ; do \
|
2014-07-04 10:14:04 +08:00
|
|
|
go test github.com/hybridgroup/$$package ; \
|
2014-06-24 09:57:41 +08:00
|
|
|
done ; \
|
2014-06-12 11:10:46 +08:00
|
|
|
|
|
|
|
cover:
|
|
|
|
echo "mode: count" > profile.cov ; \
|
|
|
|
for package in $(PACKAGES) ; do \
|
2014-07-04 10:14:04 +08:00
|
|
|
go test -covermode=count -coverprofile=tmp.cov github.com/hybridgroup/$$package ; \
|
2014-06-12 11:10:46 +08:00
|
|
|
cat tmp.cov | grep -v "mode: count" >> profile.cov ; \
|
|
|
|
done ; \
|
|
|
|
rm tmp.cov ; \
|
2014-07-02 14:10:12 +08: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 ; \
|
|
|
|
git clone --depth 1 git://github.com/hybridgroup/robeaux.git ; \
|
|
|
|
cd robeaux ; \
|
|
|
|
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 ; \
|
|
|
|
|