forked from raeffs/glyphhanger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (55 loc) · 1.86 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
################################################################################
# start / stop / prepare
################################################################################
init:
npm install
################################################################################
# releases
################################################################################
# patches a version
patch:
npm run release:patch
git push
# minor up
minor:
npm run release:minor
git push
# major up
release:
npm run release
git push
################################################################################
# docker building stuff
################################################################################
# you have to know what you're doing if your using this ;)
NODE_VERSION=14.4.0
DEBIAN_VERSION_NAME=buster
REGISTRY=talentplatforms/glyphhanger
VCS_URL=https://github.com/talentplatforms/glyphhanger
# DO NOT OVERRIDE!
_BUILD_DATE=$(shell echo $$(date -u +'%Y-%m-%dT%H:%M:%SZ'))
_VCS_REF=$(shell echo $$(git rev-parse --verify HEAD))
_IMAGE_LATEST=${REGISTRY}:latest
_DEBIAN_IMAGE_TAGGED=${REGISTRY}:${NODE_VERSION}-${DEBIAN_VERSION_NAME}-slim
# builds the image and tags it with the latest tag and the more specific tag defined in _IMAGE_TAGGED
build: build_debian
build_debian:
docker build \
--rm \
--build-arg NODE_VERSION=${NODE_VERSION} \
--build-arg DEBIAN_VERSION_NAME=${DEBIAN_VERSION_NAME} \
--build-arg BUILD_DATE=${_BUILD_DATE} \
--build-arg VCS_URL=${VCS_URL} \
--build-arg VCS_REF=${_VCS_REF} \
--build-arg BUILDKIT_INLINE_CACHE=1 \
-t ${_DEBIAN_IMAGE_TAGGED} \
-t ${REGISTRY}:latest \
-f ./debian/Dockerfile \
.
# pushes the tagged image to the registry
# if no variables are set, it uses the defaults
push: push_debian
push_debian:
docker push ${_DEBIAN_IMAGE_TAGGED}
docker push ${REGISTRY}:latest
# make NODE_VERSION=13.10.1 build push