This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
forked from mitchellh/boot2docker-vagrant-box
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
49 lines (36 loc) · 1.41 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
BOOT2DOCKER_VERSION := 1.11.1
B2D_ISO_FILE := boot2docker.iso
B2D_ISO_URL := https://github.com/boot2docker/boot2docker/releases/download/v$(BOOT2DOCKER_VERSION)/boot2docker.iso
B2D_ISO_CHECKSUM := 9be71967c5b43eb6468d45e4e3e0815d
all: parallels virtualbox
virtualbox: clean-virtualbox build-virtualbox test-virtualbox
parallels: clean-parallels build-parallels test-parallels
$(B2D_ISO_FILE):
curl -L -o ${B2D_ISO_FILE} ${B2D_ISO_URL}
$(PRL_B2D_ISO_FILE):
curl -L -o ${PRL_B2D_ISO_FILE} ${PRL_B2D_ISO_URL}
build-virtualbox: $(B2D_ISO_FILE)
packer build -parallel=false -only=virtualbox-iso \
-var 'B2D_ISO_FILE=${B2D_ISO_FILE}' \
-var 'B2D_ISO_CHECKSUM=${B2D_ISO_CHECKSUM}' \
template.json
build-parallels: $(B2D_ISO_FILE)
packer build -parallel=false -only=parallels-iso \
-var 'B2D_ISO_FILE=${B2D_ISO_FILE}' \
-var 'B2D_ISO_CHECKSUM=${B2D_ISO_CHECKSUM}' \
template.json
clean-virtualbox:
rm -f *_virtualbox.box $(B2D_ISO_FILE)
@cd tests/virtualbox; vagrant destroy -f || :
@cd tests/virtualbox; rm -f Vagrantfile
clean-parallels:
rm -f *_parallels.box $(B2D_ISO_FILE)
@cd tests/parallels; vagrant destroy -f || :
@cd tests/parallels; rm -f Vagrantfile
test-virtualbox:
@cd tests/virtualbox; bats --tap *.bats
test-parallels:
@cd tests/parallels; bats --tap *.bats
.PHONY: all virtualbox parallels clean \
clean-virtualbox build-virtualbox test-virtualbox \
clean-parallels build-parallels test-parallels