-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
36 lines (33 loc) · 1.06 KB
/
Copy pathTaskfile.yml
File metadata and controls
36 lines (33 loc) · 1.06 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
version: '3'
tasks:
env:venv:
desc: "Create venv environment"
# The status check prevents the task from running if the directory exists
status:
- test -d .venv
cmds:
- python3 -m venv .venv
deps:
desc: "Download dependencies."
# Ensures the venv is created before trying to install dependencies
deps:
- env:venv
# Taskfile will only run this if requirements.txt is newer than our marker file
sources:
- requirements.txt
generates:
- .venv/.deps_installed
cmds:
- echo "📦 Downloading dependencies..."
# Use the pip inside the venv directly
- .venv/bin/pip install -r requirements.txt
# Create a hidden marker file so Taskfile knows the install finished successfully
- touch .venv/.deps_installed
run:
desc: "Main application. Run with arg `--help` for more details."
# Ensures dependencies are installed before trying to run the app
deps:
- deps
cmds:
# Use the python inside the venv directly
- .venv/bin/python -m src.main {{.CLI_ARGS}}