Skip to content

Commit 7e29f59

Browse files
Merge pull request #33 from adamtheturtle/twine
Add sdist build process
2 parents 0f0a197 + 58c4dd7 commit 7e29f59

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

admin/release.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import datetime
66
import os
7+
import subprocess
78
from pathlib import Path
89

910
from dulwich.porcelain import add, commit, push, tag_list
@@ -95,6 +96,17 @@ def get_repo(github_token: str, github_owner: str) -> Repository:
9596
return github_user_or_org.get_repo('vws-python-mock')
9697

9798

99+
def build() -> None:
100+
"""
101+
Build source and binary distributions.
102+
"""
103+
for args in (
104+
['rm', '-rf', 'build'],
105+
['python', 'setup.py', 'sdist', 'bdist_wheel'],
106+
):
107+
subprocess.run(args=args, check=True)
108+
109+
98110
def main() -> None:
99111
"""
100112
Perform a release.
@@ -105,6 +117,7 @@ def main() -> None:
105117
version_str = get_version()
106118
update_changelog(version=version_str)
107119
commit_and_push(version=version_str, repository=repository)
120+
build()
108121
create_github_release(
109122
repository=repository,
110123
version=version_str,

0 commit comments

Comments
 (0)