-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
109 lines (101 loc) · 2.96 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: "3"
tasks:
#
# sdk
#
sdk:test:
dir: sdk/tests
cmds:
- api exec "tox"
django:middleware:test:
dir: frameworks/django/optic_django_middleware
cmds:
- tox
django:unittest:test:
dir: frameworks/django/optic_django_unittest
cmds:
- tox
sdk:publish:
desc: Publish optic-python-sdk
dir: sdk
cmds:
- task: poetry:publish
vars:
PROJECT_DIR: sdk
sdk:publish:test:
desc: Publish optic-python-sdk to test pypi
dir: sdk
cmds:
- task: poetry:publish:test
vars:
PROJECT_DIR: sdk
django:middleware:publish:
desc: Publish optic-python-django-middleware
dir: frameworks/django/optic_django_middleware
cmds:
- task: poetry:publish
vars:
PROJECT_DIR: frameworks/django/optic_django_middleware
django:middleware:publish:test:
desc: Publish optic-python-django-middleware to test pypi
dir: frameworks/django/optic_django_middleware
cmds:
- task: poetry:publish:test
vars:
PROJECT_DIR: frameworks/django/optic_django_middleware
django:unittest-plugin:publish:
desc: Publish optic-python-django-unittest-plugin
dir: frameworks/django/optic_django_unittest
cmds:
- task: poetry:publish
vars:
PROJECT_DIR: frameworks/django/optic_django_unittest
django:unittest-plugin:publish:test:
desc: Publish optic-python-django-middleware to test pypi
dir: frameworks/django/optic_django_unittest
cmds:
- task: poetry:publish:test
vars:
PROJECT_DIR: frameworks/django/optic_django_unittest
test-all:
cmds:
- task: sdk:test
- task: django:middleware:test
- task: django:unittest:test
poetry:publish:
dir: "{{.PROJECT_DIR}}"
vars:
DRY_RUN: '{{default "true" .DRY_RUN}}'
env:
POETRY_PYPI_TOKEN_PYPI: "{{.POETRY_PYPI_TOKEN_PYPI}}"
cmds:
- poetry publish --build {{if (eq .DRY_RUN "true")}}--dry-run {{end}}
preconditions:
- sh: "[[ -n $POETRY_PYPI_TOKEN_PYPI ]]"
msg: "You must set POETRY_PYPI_TOKEN_PYPI"
poetry:publish:test:
dir: "{{.PROJECT_DIR}}"
vars:
DRY_RUN: "{{default `true` .DRY_RUN}}"
env:
POETRY_PYPI_TOKEN_PYPI: "{{.POETRY_PYPI_TOKEN_PYPI}}"
POETRY_HTTP_BASIC_TESTPYPI_USERNAME: "__token__"
POETRY_HTTP_BASIC_TESTPYPI_PASSWORD: "<token>"
cmds:
- poetry config repositories.testpypi https://test.pypi.org/legacy/
- poetry config pypi-token.testpypi "$POETRY_PYPI_TOKEN_PYPI"
- poetry publish --build {{if (eq .DRY_RUN "true")}}--dry-run {{end}}--repository=testpypi
preconditions:
- sh: "[[ -n $POETRY_PYPI_TOKEN_PYPI ]]"
msg: "You must set POETRY_PYPI_TOKEN_PYPI"
git:tag-and-push:
- git switch main
- git pull --rebase
- git tag {{.CLI_ARGS}}
- git push origin main --tags
publish-all:
cmds:
- task: sdk:publish
test-publish-all:
cmds:
- task: sdk:publish:test