perf: avoid redundant bootstrap runs on commands (#26)

This commit is contained in:
Marc 2023-08-19 11:16:10 -04:00 committed by GitHub
parent a34b4e8033
commit 172d70f8d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@ yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
.task
bin
.venv

View file

@ -1,16 +1,21 @@
version: '3'
env:
VENV_PATH: "/{{ .TASKFILE_DIR }}/backend/.venv"
BASE_PATH: "/{{ .TASKFILE_DIR }}/backend"
VENV_PATH: "{{ .BASE_PATH }}/.venv"
VENV_BIN: "{{ .VENV_PATH }}/bin"
VENV_ACTIVATE: "{{ .VENV_BIN }}/activate"
DOTENV: "/{{ .TASKFILE_DIR }}/backend/.env"
DOTENV: "{{ .BASE_PATH }}/.env"
tasks:
bootstrap:
internal: true
cmds:
- . script/bootstrap
sources:
- "{{ .BASE_PATH }}/*.in"
generates:
- "{{ .VENV_PATH }}/*"
dir: backend
lint:
desc: "Lints /backend using black + pylint."

View file

@ -1,9 +1,16 @@
version: '3'
env:
BASE_PATH: "/{{ .TASKFILE_DIR }}/frontend"
tasks:
bootstrap:
internal: true
cmd: . script/bootstrap
sources:
- "{{ .BASE_PATH }}/yarn.lock"
generates:
- "{{ .BASE_PATH }}/.yarn/*"
dir: frontend
start:
desc: "Starts the frontend application."