blob: 0c961ca56b5c4ab3e8b7102651ed606aed616658 [file] [log] [blame]
# A Makefile to build, test, tag and publish the Emscripten SDK Docker container.
# Emscripten version to build: Should match the version that has been already released.
# i.e.: 1.39.18
version =
alias =
image_name ?= emscripten/emsdk
ifndef version
$(error argument 'version' is not set. Please call `make version=SOME_VERSION ...`)
build: Dockerfile .TEST
cd .. && docker build --network host --build-arg=EMSCRIPTEN_VERSION=${version} -t ${image_name}:${version} -f docker/$< .
test: .TEST
# test as non-root
docker run --rm -u `id -u`:`id -g` -w /emsdk/docker --net=host ${image_name}:${version} \
bash $<
push: .TEST
docker push ${image_name}:${version}
ifdef alias
docker tag ${image_name}:${version} ${image_name}:${alias}
docker push ${image_name}:${alias}