-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
152 lines (117 loc) · 3.77 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.PHONY: verify
verify : verify-python verify-ts
.PHONY: verify-python
verify-python : lint-python
.PHONY: verify-ts
verify-ts : lint-ts test
.PHONY: build-website
build-website :
ionic build --engine=browser
.PHONY: fix
fix :
npx prettier --write .
.PHONY: lint-ts
lint-ts :
npx eslint src/
npx prettier -c src/
.PHONY: lint-python
lint-python :
pylint data-scripts
.PHONY: lint
lint : lint-ts lint-python
.PHONY: serve
serve :
ionic serve --no-open
.PHONY: import-texts
import-texts :
python data-scripts/import.py
.PHONY: android
android :
ionic build
ionic capacitor copy android
(cd android && gradle installDebug)
.PHONY: android-deploy
android-deploy :
(cd android && gradle installDebug)
# Writes to android/app/build/outputs/apk/release/
.PHONY: android-release-signed
android-release-signed :
ionic build
ionic capacitor copy --prod android
(cd android && gradle assembleRelease -Pandroid.injected.signing.store.file="$(KEYFILE)" -Pandroid.injected.signing.store.password="$(STORE_PASSWORD)" -Pandroid.injected.signing.key.alias="$(KEY_ALIAS)" -Pandroid.injected.signing.key.password="$(KEY_PASSWORD)")
# Writes to android/app/build/outputs/apk/release/
.PHONY: android-release-unsigned
android-release-unsigned :
ionic build
ionic capacitor copy --prod android
(cd android && gradle assembleRelease)
.PHONY: translate
translate :
python data-scripts/translate.py $(ARGS)
# make shuffle ARGS=text-id
.PHONY: shuffle
shuffle :
python data-scripts/shuffle.py $(ARGS)
.PHONY: test
test :
npm test -- a --watchAll=false $(ARGS)
# E.g.
# make test-args ARGS=src/__tests__/pages/TextPage.test.tsx
.PHONY: test-args
test-args :
npm test -- --watchAll=false $(ARGS)
.PHONY: test-library-page
test-library-page :
npm test -- --watchAll=false src/__tests__/pages/LibraryPage.test.tsx
.PHONY: test-recent-page
test-recent-page :
npm test -- --watchAll=false src/__tests__/pages/RecentPage.test.tsx
.PHONY: test-text-info-page
test-text-info-page :
npm test -- --watchAll=false src/__tests__/pages/TextInfoPage.test.tsx
.PHONY: test-text-page
test-text-page :
npm test -- --watchAll=false src/__tests__/pages/TextPage.test.tsx
.PHONY: test-settings-page
test-settings-page :
npm test -- --watchAll=false src/__tests__/pages/SettingsPage.test.tsx
.PHONY: test-about-page
test-about-page :
npm test -- --watchAll=false src/__tests__/pages/AboutPage.test.tsx
.PHONY: test-landing-page
test-landing-page :
npm test -- --watchAll=false src/__tests__/pages/LandingPage.test.tsx
.PHONY: test-ftue
test-ftue :
npm test -- --watchAll=false src/__tests__/pages/Ftue.test.tsx
.PHONY: test-interface-language
test-interface-language :
npm test -- --watchAll=false src/__tests__/InterfaceLanguage.test.tsx
.PHONY: export-android-to-dropbox
export-android-to-dropbox :
cp android/app/build/outputs/apk/debug/app-debug.apk ~/Dropbox/tmp/
.PHONY: generate-android-splash
generate-android-splash :
cordova-res android --type splash --fit contain --copy
.PHONY: clean
clean:
rm -rf build/
rm -rf android/build/
rm -rf android/app/build/
rm -rf android/app/release/
.PHONY: deploy-website-cfn-alpha
deploy-website-cfn-alpha :
python aws/deploy-cfn.py alpha
.PHONY: deploy-website-content-alpha
deploy-website-content-alpha : build-website
python aws/deploy-content.py alpha
.PHONY: deploy-website-alpha
deploy-website-alpha : deploy-website-cfn-alpha deploy-website-content-alpha
.PHONY: deploy-website-cfn-prod
deploy-website-cfn-prod :
python aws/deploy-cfn.py prod
.PHONY: deploy-website-content-prod
deploy-website-content-prod : build-website
python aws/deploy-content.py prod
.PHONY: deploy-website-prod
deploy-website-prod : deploy-website-cfn-prod deploy-website-content-prod