-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
26 lines (24 loc) · 1.26 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
# SHELL:=/bin/bash
packageversion = $(shell cat package.json | jq -r '.version')
.EXPORT_ALL_VARIABLES:
docker_image_cjs=$(shell docker images -q boardgamegeekjsclient:cjs)
docker_image_esm=$(shell docker images -q boardgamegeekjsclient:esm)
docker_image_react=$(shell docker images -q boardgamegeekjsclient:react)
cjs-build-tag:
@echo 'create tag cjs -> package version build test: $(packageversion)'
docker build --pull --rm -f "Dockerfile.buildtest.cjs" -t boardgamegeekjsclient:cjs --build-arg VERSION=$(packageversion) "."
cjs-run:
docker run boardgamegeekjsclient:cjs
cjs-build-run: cjs-build-tag
docker run boardgamegeekjsclient:cjs
esm-build-tag:
@echo 'create tag esm -> package version build test: $(packageversion)'
docker build --pull --rm -f "Dockerfile.buildtest.esm" -t boardgamegeekjsclient:esm --build-arg VERSION=$(packageversion) "."
esm-build-run: esm-build-tag
docker run boardgamegeekjsclient:esm
react-build-tag:
@echo 'create tag react -> package version build test: $(packageversion)'
docker build --pull --rm -f "Dockerfile.buildtest.react" -t boardgamegeekjsclient:react --build-arg VERSION=$(packageversion) "."
react-build-run: react-build-tag
docker run -p 3000:3000 boardgamegeekjsclient:react
build-run-all: cjs-build-run esm-build-run react-build-run