Skip to content

Commit 48fada0

Browse files
committed
Add a corresponding build cli subcommand
1 parent 04e1f3f commit 48fada0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

changes/cli.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
from changes import attributes, config, probe, version
66
from changes.changelog import generate_changelog
77
from changes.flow import perform_release
8-
from changes.packaging import install_package, upload_package, install_from_pypi
8+
from changes.packaging import build_package, install_package, upload_package, install_from_pypi
99
from changes.vcs import tag_and_push
1010
from changes.version import increment_version
1111

1212
log = logging.getLogger(__name__)
1313

1414

15-
16-
1715
@click.group()
1816
@click.argument('module_name')
1917
@click.option('--dry-run', is_flag=True, default=False, help='Prints (instead of executing) the operations to be performed.')
@@ -57,6 +55,13 @@ def bump_version(context):
5755
increment_version(context.obj)
5856

5957

58+
@click.command()
59+
@click.pass_context
60+
def build(context):
61+
"""Attempts to build the sdist and wheel."""
62+
build_package(context.obj)
63+
64+
6065
@click.command()
6166
@click.option('--test-command', help='Command to use to test the newly installed package.')
6267
@click.pass_context
@@ -90,6 +95,7 @@ def tag(context):
9095
"""Tags your git repo with the new version number"""
9196
tag_and_push(context.obj)
9297

98+
9399
@click.command()
94100
@click.option('--skip-changelog', is_flag=True, help='For the release task: should the changelog be generated and committed?')
95101
@click.pass_context
@@ -101,6 +107,7 @@ def release(context, skip_changelog):
101107

102108
main.add_command(changelog)
103109
main.add_command(bump_version)
110+
main.add_command(build)
104111
main.add_command(install)
105112
main.add_command(upload)
106113
main.add_command(pypi)

0 commit comments

Comments
 (0)