forked from hypriot/device-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (20 loc) · 1.16 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
build:
docker build -t device-init .
clean:
rm -f device-init_*
compile: build clean
docker run -ti --rm -v $(shell pwd):/opt/gopath/src/github.com/hypriot/device-init -v $(shell pwd)/scripts/build.sh:/build.sh device-init /build.sh
test: build
docker run -ti --rm --privileged --hostname device-tester -v $(shell pwd)/device-init_linux_amd64:/usr/local/bin/device-init -v $(shell pwd)/specs:/specs -v /var/run/docker.sock:/var/run/docker.sock device-init rspec --format documentation --color /specs/
compile_and_test: compile test
test-shell: build
docker run -ti --rm --privileged --hostname device-tester -v $(shell pwd)/device-init_linux_amd64:/usr/local/bin/device-init -v $(shell pwd)/specs:/specs -v /var/run/docker.sock:/var/run/docker.sock device-init bash
shell: build
docker run -ti --rm -v $(shell pwd):/opt/gopath/src/github.com/hypriot/device-init -v $(shell pwd)/scripts/build.sh:/build.sh device-init /bin/bash
clean_deb:
rm -f *.deb
deb_arm: build clean_deb
docker run -ti --rm -v $(shell pwd):/workspace -v $(shell pwd)/scripts/build_deb.sh:/build_deb.sh device-init /build_deb.sh
tag:
git tag $(shell cat VERSION)
git push origin $(shell cat VERSION)