forked from docker/docker-install
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
96 lines (86 loc) · 2.67 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
SHELL:=/bin/bash
DISTROS:=centos-7 fedora-28 fedora-29 debian-jessie debian-stretch debian-buster ubuntu-trusty ubuntu-xenial ubuntu-yakkety ubuntu-artful
VERIFY_INSTALL_DISTROS:=$(addprefix x86_64-verify-install-,$(DISTROS))
CHANNEL_TO_TEST?=test
VERSION?=
SHELLCHECK_EXCLUSIONS=$(addprefix -e, SC1091 SC1117)
SHELLCHECK=docker run --rm -v "$(CURDIR)":/v -w /v koalaman/shellcheck $(SHELLCHECK_EXCLUSIONS)
.PHONY: shellcheck
shellcheck:
$(SHELLCHECK) install.sh
.PHONY: check
check: $(VERIFY_INSTALL_DISTROS)
.PHONY: clean
clean:
$(RM) *-verify-install-*
$(RM) -r build
x86_64-verify-install-%:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
$(subst -,:,$*) \
/v/verify-docker-install | tee $@
armhf-verify-install-raspbian-jessie:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
resin/rpi-raspbian:jessie \
/v/verify-docker-install | tee $@
armhf-verify-install-raspbian-stretch:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
resin/rpi-raspbian:stretch \
/v/verify-docker-install | tee $@
armhf-verify-install-%:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
arm32v7/$(subst -,:,$*) \
/v/verify-docker-install | tee $@
aarch64-verify-install-%:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
arm64v8/$(subst -,:,$*) \
/v/verify-docker-install | tee $@
s390x-verify-install-%:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
s390x/$(subst -,:,$*) \
/v/verify-docker-install | tee $@
ppc64le-verify-install-%:
mkdir -p build
sed 's/DEFAULT_CHANNEL_VALUE="test"/DEFAULT_CHANNEL_VALUE="$(CHANNEL_TO_TEST)"/' install.sh > build/install.sh
set -o pipefail && docker run \
--rm \
-e VERSION \
-v $(CURDIR):/v \
-w /v \
ppc64le/$(subst -,:,$*) \
/v/verify-docker-install | tee $@