forked from libp2p/js-libp2p
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 1.46 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
image_name := js-libp2p-head
TEST_SOURCES := $(wildcard test/*.ts)
# Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
# all: node-image.json webkit-image.json firefox-image.json chromium-image.json
all: node-image.json firefox-image.json chromium-image.json
node-image.json: Dockerfile $(TEST_SOURCES) package.json .aegir.js
cd .. && docker build -f interop/Dockerfile -t node-${image_name} .
docker image inspect node-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
chromium-image.json: node-image.json BrowserDockerfile $(TEST_SOURCES) package.json .aegir.js
cd .. && docker build -f interop/BrowserDockerfile --build-arg=BROWSER=chromium -t chromium-${image_name} .
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
firefox-image.json: node-image.json BrowserDockerfile $(TEST_SOURCES) package.json .aegir.js
cd .. && docker build -f interop/BrowserDockerfile --build-arg=BROWSER=firefox -t firefox-${image_name} .
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
webkit-image.json: node-image.json BrowserDockerfile $(TEST_SOURCES) package.json .aegir.js
cd .. && docker build -f interop/BrowserDockerfile --build-arg=BROWSER=webkit -t webkit-${image_name} .
docker image inspect webkit-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@
.PHONY: clean
clean:
rm *image.json