@@ -192,44 +192,6 @@ def test(c, arguments='', running=True):
192
192
else :
193
193
c .run (f'{ DOCKER_COMPOSE_COMMAND } run -e GITHUB_USER=$GITHUB_USER -e GITHUB_TOKEN=$GITHUB_TOKEN --rm --no-deps web tox { arguments } ' , pty = True )
194
194
195
- @task
196
- def buildassets (c ):
197
- """Build all assets for the application and push them to backend storage"""
198
- c .run (f'docker compose -f { DOCKER_COMPOSE_ASSETS } run --rm assets bash -c "npm ci && node_modules/bower/bin/bower --allow-root update && npm run build"' , pty = True )
199
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web uv run python3 manage.py collectstatic --noinput' , pty = True )
200
-
201
-
202
- @task (help = {
203
- 'action' : 'Action to realize on Transifex ("pull" or "push")' ,
204
- })
205
- def translations (c , action ):
206
-
207
- if action not in ('pull' , 'push' ):
208
- print (f'Action passed ("{ action } ") not supported. Use "pull" or "push".' )
209
- sys .exit (1 )
210
-
211
- transifex_token = os .environ .get ('TRANSIFEX_TOKEN' , None )
212
- if not transifex_token :
213
- print ('You need to export TRANSIFEX_TOKEN environment variable.' )
214
- sys .exit (1 )
215
-
216
-
217
- # Download Transifex Client to be used from inside the container
218
- if not os .path .exists ('tx' ):
219
- download_file = 'https://github.com/transifex/cli/releases/download/v1.1.0/tx-linux-amd64.tar.gz'
220
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web /bin/bash -c "curl --location { download_file } | tar --extract -z --file=- tx"' , pty = True )
221
-
222
- if action == 'pull' :
223
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web ./tx --token { transifex_token } pull --force' , pty = True )
224
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web /bin/bash -c "cd readthedocs/ && uv run python3 ../manage.py makemessages --all"' , pty = True )
225
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web /bin/bash -c "cd readthedocs/ && uv run python3 ../manage.py compilemessages"' , pty = True )
226
-
227
- elif action == 'push' :
228
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web /bin/bash -c "cd readthedocs/ && uv run python3 ../manage.py makemessages --locale en"' , pty = True )
229
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web ./tx --token { transifex_token } push --source' , pty = True )
230
- c .run (f'{ DOCKER_COMPOSE_COMMAND } run --rm web /bin/bash -c "cd readthedocs/ && uv run python3 ../manage.py compilemessages --locale en"' , pty = True )
231
-
232
-
233
195
@task (help = {
234
196
'tool' : 'build.tool to compile (python, nodejs, rust, golang)' ,
235
197
'version' : 'specific version for the tool' ,
0 commit comments