forked from kyma-incubator/varkes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 1.03 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
APP_NAME = varkes
varkes_version :=$(shell cat lerna.json | jq .version) #read project version.
ifeq ($(varkes_version), "0.0.0" )
DOCKER_TAG=master # 0.0.0 means we are in master branch
else
DOCKER_TAG=$(varkes_version) #else use defined version by lerna version
endif
.PHONY: ci-pr
ci-pr: resolve validate
.PHONY: ci-master
ci-master: resolve validate
.PHONY: ci-release
ci-release: resolve npm-publish docker-build docker-push
resolve:
npx lerna bootstrap
npx lerna run compile
validate:
npx lerna run test
npm-publish:
echo "//registry.npmjs.org/:_authToken=\"${BOT_NPM_TOKEN}\"" > .npmrc
npx lerna publish from-package --yes
clean:
npx lerna clean
npx lerna run clean
test:
echo $(DOCKER_TAG)
docker-build:
#call docker-build in sub makefiles with docker parameter
npx lerna exec --no-bail -- make docker-build DOCKER_TAG=$(DOCKER_TAG)
docker-push:
#call docker-push in sub makefiles with docker parameter
npx lerna exec --no-bail -- make docker-push DOCKER_TAG=$(DOCKER_TAG)