forked from avniproject/avni-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (45 loc) · 2 KB
/
Makefile
File metadata and controls
58 lines (45 loc) · 2 KB
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
check-node-v:
ifneq ($(shell node -v),$(shell cat .nvmrc))
@echo -e '\nPlease run `nvm use` in your terminal to change node version\n'
@exit 1
endif
@node -v
clean:
rm -rf node_modules
deps: check-node-v
yarn install
start: check-node-v
yarn start
test: check-node-v
yarn test
prettier-all: check-node-v
yarn prettier-all
port:= $(if $(port),$(port),8021)
server:= $(if $(server),$(server),http://localhost)
auth:
$(if $(password),$(eval token:=$(shell node scripts/token.js '$(server):$(port)' $(username) $(password))))
upload = \
curl -X POST $(server):$(port)/$(1) -d $(2) \
-H "Content-Type: application/json" \
-H "USER-NAME: admin" \
-H "AUTH-TOKEN: $(token)"
deploy_platform_translations: auth
$(call upload,platformTranslation,@translations/en.json)
@echo
$(call upload,platformTranslation,@translations/gu_IN.json)
@echo
$(call upload,platformTranslation,@translations/hi_IN.json)
@echo
$(call upload,platformTranslation,@translations/mr_IN.json)
@echo
$(call upload,platformTranslation,@translations/ta_IN.json)
@echo
$(call upload,platformTranslation,@translations/ka_IN.json)
deploy_platform_translations_staging:
make deploy_platform_translations poolId=$(OPENCHS_STAGING_USER_POOL_ID) clientId=$(OPENCHS_STAGING_APP_CLIENT_ID) server=https://staging.openchs.org port=443 username=admin password=$(password)
deploy_platform_translations_uat:
make deploy_platform_translations poolId=$(OPENCHS_UAT_USER_POOL_ID) clientId=$(OPENCHS_UAT_APP_CLIENT_ID) server=https://uat.openchs.org port=443 username=admin password=$(password)
deploy_platform_translations_live:
make deploy_platform_translations poolId=$(OPENCHS_PROD_USER_POOL_ID) clientId=$(OPENCHS_PROD_APP_CLIENT_ID) server=https://server.openchs.org port=443 username=admin password=$(password)
deploy_platform_translations_prerelease:
make deploy_platform_translations poolId=$(OPENCHS_PRERELEASE_USER_POOL_ID) clientId=$(OPENCHS_PRERELEASE_APP_CLIENT_ID) server=https://prerelease.openchs.org port=443 username=admin password=$(password)