-
Notifications
You must be signed in to change notification settings - Fork 6
/
Taskfile.yml
36 lines (31 loc) · 1.15 KB
/
Taskfile.yml
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"
vars:
PYAPSI_VERSION:
sh: poetry version -s
tasks:
base:
cmds:
- docker build -f docker/base.Dockerfile -t pyapsi:base .
build:
deps: [base]
vars:
PYTHON_VERSION_SLUG:
sh: echo "$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f1)$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f2)"
cmds:
- docker build --build-arg PYTHON_VERSION={{.PYTHON_VERSION}} -f docker/py.Dockerfile -t pyapsi:py{{.PYTHON_VERSION_SLUG}} .
test:
deps: [build]
vars:
PYTHON_VERSION_SLUG:
sh: echo "$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f1)$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f2)"
cmds:
- docker run pyapsi:py{{.PYTHON_VERSION_SLUG}}
wheel:
deps: [test]
vars:
PYTHON_VERSION_SLUG:
sh: echo "$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f1)$(echo '{{.PYTHON_VERSION}}' | cut -d'.' -f2)"
WHEEL_FILE: apsi-{{.PYAPSI_VERSION}}-cp{{.PYTHON_VERSION_SLUG}}-cp{{.PYTHON_VERSION_SLUG}}-manylinux_2_31_x86_64.whl
cmds:
- mkdir -p ./dist
- docker run --rm --entrypoint cat pyapsi:py{{.PYTHON_VERSION_SLUG}} /tmp/pyapsi/wheelhouse/{{.WHEEL_FILE}} > ./dist/{{.WHEEL_FILE}}