forked from y-kkamil/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (37 loc) · 1007 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
40
41
42
43
44
45
46
47
48
IMG_NAME = add-ons-ui
IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(IMG_NAME)
TAG = $(DOCKER_TAG)
ci-pr: root-pr resolve validate build pre-build-image pull-licenses build-image push-image
ci-master: root-master resolve validate build pre-build-image pull-licenses build-image push-image
.PHONY: root-pr
root-pr:
make -C "../" ci-pr
.PHONY: root-master
root-master:
make -C "../" ci-master
.PHONY: resolve
resolve:
npm install
.PHONY: validate
resolve:
npm run type-check
.PHONY: build
build:
npm run build
.PHONY: pre-build-image
pre-build-image:
../scripts/pre-build-docker-image.sh
.PHONY: pull-licenses
pull-licenses:
ifdef LICENSE_PULLER_PATH
bash $(LICENSE_PULLER_PATH) --dirs-to-pulling="../,../common,../components/react,../components/shared,../components/generic-documentation"
else
mkdir -p licenses
endif
.PHONY: build-image
build-image:
docker build -t $(IMG_NAME) .
.PHONY: push-image
push-image:
docker tag $(IMG_NAME) $(IMG):$(TAG)
docker push $(IMG):$(TAG)