Skip to content

Commit

Permalink
Add a corresponding build cli subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Oct 12, 2014
1 parent 04e1f3f commit 48fada0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions changes/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
from changes import attributes, config, probe, version
from changes.changelog import generate_changelog
from changes.flow import perform_release
from changes.packaging import install_package, upload_package, install_from_pypi
from changes.packaging import build_package, install_package, upload_package, install_from_pypi
from changes.vcs import tag_and_push
from changes.version import increment_version

log = logging.getLogger(__name__)




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


@click.command()
@click.pass_context
def build(context):
"""Attempts to build the sdist and wheel."""
build_package(context.obj)


@click.command()
@click.option('--test-command', help='Command to use to test the newly installed package.')
@click.pass_context
Expand Down Expand Up @@ -90,6 +95,7 @@ def tag(context):
"""Tags your git repo with the new version number"""
tag_and_push(context.obj)


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

main.add_command(changelog)
main.add_command(bump_version)
main.add_command(build)
main.add_command(install)
main.add_command(upload)
main.add_command(pypi)
Expand Down

0 comments on commit 48fada0

Please sign in to comment.