-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
60 lines (49 loc) · 1.33 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
# <makefile>
# Objects: metadata, package, env (code platform), rules
# Actions: clean, build, deploy, test
help:
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done
# </makefile>
define _deploy
rm -rf $1/*
mkdir $1/dist
cp -r dist/* $1/dist/
cp ./* $1/
endef
set_node_version:
. ${NVM_DIR}/nvm.sh && nvm use
clean:
rm -rf node_modules
deps: set_node_version
yarn install
check-project-versions:
npm search openchs-models
build: set_node_version
yarn run build
tests: set_node_version build
yarn test
ci-build:
yarn install
yarn run build
yarn test
release:
git pull --tags
git pull --rebase
yarn version --patch
@echo " Now please run \nmake publish"
publish:
git push && git push origin --tags
deploy-local:
ifeq ($(local),)
@echo -e '\nPlease provide the local location of node modules where to install. e.g. local=../avni-web-app/ or local=../avni-client/packages/openchs-android \n'
@exit 1
endif
$(call _deploy,$(local)/node_modules/avni-health-modules/dist)