1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/aurweb/templates/aurweb-git-auth.sh.j2
moson-mo 21ceb09318
fix: run aurweb ssh commands and git scripts in virtualenv
Adjust bash wrapper scripts to activate our python virtualenv:
Script execution is triggered from ssh / git.
These wrapper scripts then call python scripts created by poetry.

We should make sure that this happens within our venv.

Previously this was done by using "poetry run...".
However, using poetry is costly and adds some delay.
Instead of using poetry, we can just activate our venv
and then execute our scripts.

Fixes: b15ac83821ae ("aurweb: Make SSH faster by avoiding slow Poetry (~2,5 sec faster)")

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-24 13:59:16 +02:00

5 lines
86 B
Django/Jinja

#!/bin/bash
cd "{{ aurweb_dir }}"
source .venv/bin/activate
exec aurweb-git-auth "$@"