-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
63 lines (48 loc) · 1.52 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
clean:
rm -rf node_modules
deps:
@rm -f package-lock.json
yarn install
tests:
yarn test
build:
yarn run build
release: get-current-version
@echo "\033[0m"
@yarn version
@echo " Now please run \nmake publish"
publish:
git push && git push origin --tags
copy-dist-to-avni-client:
cp -r * ../avni-client/packages/openchs-android/node_modules/openchs-models/
deploy-to-avni-client-only:
$(call _deploy,../avni-client/packages/openchs-android/node_modules/openchs-models)
deploy-to-avni-web-only:
$(call _deploy,../avni-webapp/node_modules/openchs-models)
deploy-to-avni-rule-server-only:
$(call _deploy,../rule-server/node_modules/openchs-models)
deploy-to-avni-client: build deploy-to-avni-client-only
deploy-to-avni-web: build deploy-to-avni-web-only
deploy-to-avni-rule-server: build deploy-to-avni-rule-server-only
deploy-to-avni-project: build
$(if $(local),$(call _deploy,$(local)/node_modules/openchs-models))
deploy-as-source-to-avni-client:
$(call _deploy_as_source,../avni-client/packages/openchs-android/node_modules/openchs-models)
define _deploy_as_source
rm -rf $1/*
mkdir $1/dist
cp -r src/* $1/dist/
cp package.json $1/
endef
define _deploy
rm -rf $1/*
mkdir $1/dist
cp -r dist/* $1/dist/
cp package.json $1/
endef
get-current-version:
git pull --tags
git pull --rebase
@echo "Ensure version changes follow semantic versioning - https://classic.yarnpkg.com/en/docs/dependency-versions#toc-semantic-versioning"
@echo "\033[1mLatest openchs-models version across branches:"
npm view openchs-models version