-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathTaskfile.yml
More file actions
149 lines (135 loc) · 5.29 KB
/
Taskfile.yml
File metadata and controls
149 lines (135 loc) · 5.29 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
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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
# https://taskfile.dev
version: '3'
vars:
TESTING_DIR: './backend/Testing'
HG_REPO_DIR: './hgweb/repos'
DATA_DIR: './data'
includes:
k8s:
taskfile: ./deployment/Taskfile.yml
dir: ./deployment
gh:
dir: ./.github
taskfile: ./.github/Taskfile.yml
ui:
taskfile: ./frontend/Taskfile.yml
dir: ./frontend
api:
taskfile: ./backend/Taskfile.yml
dir: ./backend
hgweb:
taskfile: ./hgweb/Taskfile.yml
dir: ./hgweb
test:
taskfile: ./backend/Testing/Taskfile.yml
dir: ./backend/Testing
fw-lite:
taskfile: ./backend/FwLite/Taskfile.yml
dir: ./backend/FwLite
crowdin:
aliases: [c]
taskfile: ./crowdin/Taskfile.yml
dir: ./crowdin
tasks:
setup:
deps: [ setup-win, setup-unix ]
cmds:
- git config blame.ignoreRevsFile .git-blame-ignore-revs
- git submodule init
- git submodule update --recursive
- git config --local submodule.recurse true
- npx --yes husky
- task: setup-k8s
- docker build -t local-dev-init data/
setup-k8s:
cmds:
- kubectl --context=docker-desktop apply -f deployment/setup/namespace.yaml
- kubectl --context=docker-desktop apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.0/cert-manager.yaml
setup-win:
platforms: [ windows ]
cmds:
- powershell "if (!(test-path deployment/local-dev/local.env)) { cp deployment/local-dev/local.env.template deployment/local-dev/local.env }"
- powershell -File download.ps1 sena-3 'https://drive.google.com/uc?export=download&id=1I-hwc0RHoQqW774gbS5qR-GHa1E7BlsS' 'BEC5131799DB07BF8D84D8FC1F3169FB2574F2A1F4C37F6898EAB563A4AE95B8'
- powershell -File download.ps1 empty 'https://drive.google.com/uc?export=download&id=1p73u-AGdSwNkg_5KEv9-4iLRuN-1V-LD' 'F4EB48D2C7B3294DCA93965F14F058E56D797F38D562B86CF0372F774E1B486B'
- powershell -File download.ps1 elawa 'https://drive.usercontent.google.com/download?export=download&id=1Jk-eSDho8ATBMS-Kmfatwi-MWQth26ro&confirm=t' "E3608F1E3188CE5FDB166FBF9D5AAD06558DB68EFA079FB453881572B50CB8E3"
setup-unix:
platforms: [ linux, darwin ]
cmds:
- "test -f deployment/local-dev/local.env || cp deployment/local-dev/local.env.template deployment/local-dev/local.env"
- wget -c -O {{.DATA_DIR}}/sena-3.zip 'https://drive.google.com/uc?export=download&id=1I-hwc0RHoQqW774gbS5qR-GHa1E7BlsS'
- wget -c -O {{.DATA_DIR}}/empty.zip 'https://drive.google.com/uc?export=download&id=1p73u-AGdSwNkg_5KEv9-4iLRuN-1V-LD'
- wget -c -O {{.DATA_DIR}}/elawa.zip 'https://drive.usercontent.google.com/download?export=download&id=1Jk-eSDho8ATBMS-Kmfatwi-MWQth26ro&confirm=t'
setup-local-env:
cmds:
- echo "HONEYCOMB_API_KEY=__REPLACE__" > deployment/local-dev/local.env
- echo "#OTEL_SDK_DISABLED=true" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_ID=__REPLACE__.apps.googleusercontent.com" >> deployment/local-dev/local.env
- echo "GOOGLE_OAUTH_CLIENT_SECRET=__REPLACE__" >> deployment/local-dev/local.env
# k8s
up:
interactive: true
aliases: [backend-up]
cmds:
- tilt up
prod-ui-up:
interactive: true
desc: 'Starts the cluster using the production build of UI, good for automated testing'
cmds:
- tilt up -- --prod-ui-build
prod-up:
interactive: true
desc: 'Starts the cluster using the production build, should use less memory, good for testing'
cmds:
- tilt up -- --prod-build
# dev
infra-up:
desc: 'Starts infrastructure for our ui and api, does not forward ports for api, if you want port forwarding use k8s:infra-forward'
cmds:
- tilt up -- --lexbox-api-local
ui-dev:
aliases: [ ui ]
desc: The single command for local ui development
dir: ./frontend
deps: [ backend-up, ui:only ]
interactive: true
# api
api-dev:
aliases: [ api ]
desc: The single command for local api development
deps: [ infra-up, api:only, k8s:infra-forward ]
interactive: true
local-lexbox:
desc: 'Run front and backend locally'
deps: [api:only, k8s:infra-forward, ui:lexbox-only]
interactive: true
fw-lite-web:
aliases:
- web
- web-for-develop
deps: [ fw-lite:web, ui:fw-lite-infr]
fw-lite-win:
deps: [fw-lite:maui-windows, ui:fw-lite-infr]
fw-lite-android:
aliases: [android]
deps: [fw-lite:run-maui-android]
fw-lite-android-dev:
aliases: [android-dev]
desc: Build & run the "Dev" flavor on Android (installs alongside the prod app)
deps: [fw-lite:run-maui-android-dev]
fw-lite-android-emulator-dev:
aliases: [android-emulator-dev]
desc: Build & run the "Dev" flavor on a running x86_64 emulator (installs alongside the prod app)
deps: [fw-lite:run-maui-android-emulator-dev]
fw-lite-android-install:
aliases: [android-install]
desc: Install without building
deps: [fw-lite:install-maui-android]
fw-lite-android-install-dev:
aliases: [android-install-dev]
desc: Install the "Dev" flavor without building
deps: [fw-lite:install-maui-android-dev]
fw-lite-android-install-emulator-dev:
aliases: [android-install-emulator-dev]
desc: Install the "Dev" flavor on a running x86_64 emulator without building
deps: [fw-lite:install-maui-android-emulator-dev]