-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
42 lines (36 loc) · 1.14 KB
/
justfile
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
37
38
39
40
41
42
PROJECTS := "pytest-extension pytest-slc pytest-backend"
# Default target
default:
just --list
# Run tests for one or multiple projects within this respository
test +projects=PROJECTS:
#!/usr/bin/env python3
import subprocess, sys
rc = 0
def run(command):
global rc
result = subprocess.run(command.split())
rc = result.returncode or rc
for p in "{{projects}}".split():
run(f"poetry -C {p}/ install")
run(f"poetry -C {p}/ run nox -f {p}/noxfile.py -s test:coverage")
sys.exit(rc)
relock +projects=PROJECTS:
#!/usr/bin/env python3
import subprocess, sys
rc = 0
def run(command):
global rc
result = subprocess.run(command.split())
rc = result.returncode or rc
for p in "{{projects}}".split():
run(f"poetry -C {p}/ update")
sys.exit(rc)
# Create a release
release project:
@echo "Ensure environment variables are set:"
@echo "- POETRY_HTTP_BASIC_PYPI_USERNAME=__token__"
@echo "- POETRY_HTTP_BASIC_PYPI_PASSWORD=<your token>"
#!/usr/bin/env bash
poetry -C $(pwd)/{{project}}/ build
poetry -C $(pwd)/{{project}}/ publish