chore: start using task

This commit is contained in:
Michele Cereda
2024-11-03 02:06:59 +01:00
parent e912768f98
commit 032c348fd1
2 changed files with 47 additions and 9 deletions

24
Taskfile.yml Normal file
View File

@@ -0,0 +1,24 @@
---
version: '3'
vars:
REQUIREMENTS_FILE: requirements.txt
VENV_DIR: .venv
tasks:
create-venv:
cmds:
- python3.12 -m 'venv' '{{.VENV_DIR}}'
- >-
{{.VENV_DIR}}/bin/pip --require-virtualenv install -r '{{.REQUIREMENTS_FILE}}'
recreate-venv:
cmds:
- rm -rf '{{.VENV_DIR}}'
- task: create-venv
update-venv:
cmd: >-
{{.VENV_DIR}}/bin/pip freeze -l --require-virtualenv | sed 's/==/>=/'
| xargs {{.VENV_DIR}}/bin/pip --require-virtualenv install -U