-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
39 lines (31 loc) · 888 Bytes
/
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
# Name of the image
name := mage/mage
# Latest Node version supported
latest := 8.8.1
# Default set of version for `make all`
versions := \
$(latest) \
7.10.1 \
6.11.3 \
5.12.0 \
4.8.4
# Default version for `make build`
version := $(latest)
build-version:
docker build -t $(name):$(version) --build-arg=node_version=$(version) .
[[ "$(version)" == "$(latest)" ]] && docker tag $(name):$(version) $(name):latest || true
build:
for version in $(versions); do \
echo ">> Building version $${version}"; \
$(MAKE) build-version version=$${version} || exit $${?}; \
done
release-version:
docker push $(name):$(version)
git-push:
git push [email protected]:mage/mage-docker.git master
release: git-push
for version in $(versions); do \
echo ">> Release version $${version}"; \
$(MAKE) release-version version=$${version}; \
done
$(MAKE) release-version version=latest