-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathMakefile
27 lines (24 loc) · 1.09 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
PROJECT = origin-backend-irec-app
NAME = energyweb/${PROJECT}
TAG_CANARY := $(shell yarn info @energyweb/${PROJECT}@canary --json dist-tags.canary | jq -r .data)
TAG_LATEST := $(shell yarn info @energyweb/${PROJECT} --json dist-tags.latest | jq -r .data)
LATEST = ${NAME}:latest
CANARY = ${NAME}:canary
build-local:
@docker build -t ${NAME}:local -f Dockerfile ../../
build-canary:
@rm -rf ./deployment
@mkdir ./deployment
@rush deploy -p @energyweb/origin-backend-irec-app -t ./deployment --overwrite
@docker rmi ${LATEST} -f
@docker buildx build -t ${NAME}:${TAG_CANARY} --platform linux/amd64 --build-arg VERSION=${TAG_CANARY} -f Dockerfile ./deployment
@rm -rf ./deployment
@docker tag ${NAME}:${TAG_CANARY} ${CANARY}
build-latest:
@rm -rf ./deployment
@mkdir ./deployment
@rush deploy -p @energyweb/origin-backend-irec-app -t ./deployment --overwrite
@docker rmi ${LATEST} -f
@docker buildx build -t ${NAME}:${TAG_LATEST} --platform linux/amd64 --build-arg VERSION=${TAG_LATEST} -f Dockerfile ./deployment
@rm -rf ./deployment
@docker tag ${NAME}:${TAG_LATEST} ${LATEST}