Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit a33fa51

Browse files
committed
Add task to publish to pypi
1 parent 6ec81bf commit a33fa51

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

.vscode/tasks.json

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@
44
{
55
"label": "Clean build artifacts",
66
"type": "shell",
7-
"command": [
8-
"rm -r dist/*;",
9-
"rm -r *.egg-info;"
10-
],
7+
"linux": {
8+
"command": [
9+
"rm -r dist/* 2> /dev/null;",
10+
"rm -r *.egg-info 2> /dev/null;",
11+
"echo '' > /dev/null;" // continue running even if rm fails
12+
]
13+
},
14+
"windows": {
15+
// It is assumed that VSCode uses default terminal shell for Windows - Powershell
16+
"command": [
17+
"rm -r dist/* 2> $null;",
18+
"rm -r *.egg-info 2> $null;",
19+
"echo '' > $null" // continue running even if rm fails
20+
]
21+
},
1122
"hide": true,
1223
"presentation": {
1324
"echo": false,
@@ -48,6 +59,20 @@
4859
"clear": true,
4960
"reveal": "silent"
5061
}
62+
},
63+
{
64+
"label": "Publish to PyPI",
65+
"type": "shell",
66+
"command": [
67+
"python -m twine upload --repository pypi dist/*;"
68+
],
69+
"presentation": {
70+
"echo": false,
71+
"panel": "dedicated",
72+
"showReuseMessage": false,
73+
"clear": true,
74+
"reveal": "silent"
75+
}
5176
}
5277
]
5378
}

0 commit comments

Comments
 (0)