# Path: makeapp/exceptions.py
# class MakeappException(Exception):
#     """Base makeapp exception."""


import logging
import sys
import click
from pathlib import Path
from .exceptions import MakeappException
    from . import VERSION
    from .appmaker import AppMaker
    from .apptools import Project, VERSION_NUMBER_CHUNKS
    from .utils import configure_logging
    version_str, version_summary = project.get_release_info(increment)

    if not version_summary:
        click.secho('No changes found in changelog. Please add changes before release', fg='red', err=True)
        sys.exit(1)

    click.secho(f'Version current: {project.package.version_current_str}', fg='blue')
    click.secho(f'Version next: {project.package.version_next_str}', fg='green')
    click.secho(version_summary)

    if click.confirm('Commit changes?', default=True):
        project.release(version_str, version_summary)

        if click.confirm('Publish to remotes?', default=True):
            project.publish()

    click.secho('Done', fg='green')


@entry_point.command()
@click.argument('description', nargs=-1)
def change(description):
    """Fixates a change adding a message to a changelog."""
    Project().add_change(description)
    click.secho('Done', fg='green')


def main():
    try:
        entry_point(obj={})

# Path: makeapp/exceptions.py
# class MakeappException(Exception):
#     """Base makeapp exception."""


# Path: makeapp/cli.py
import logging
import sys
import click
from pathlib import Path
from .exceptions import MakeappException
    from . import VERSION
    from .appmaker import AppMaker
    from .apptools import Project, VERSION_NUMBER_CHUNKS
    from .utils import configure_logging

    version_str, version_summary = project.get_release_info(increment)

    if not version_summary:
        click.secho('No changes found in changelog. Please add changes before release', fg='red', err=True)
        sys.exit(1)

    click.secho(f'Version current: {project.package.version_current_str}', fg='blue')
    click.secho(f'Version next: {project.package.version_next_str}', fg='green')
    click.secho(version_summary)

    if click.confirm('Commit changes?', default=True):
        project.release(version_str, version_summary)

        if click.confirm('Publish to remotes?', default=True):
            project.publish()

    click.secho('Done', fg='green')


@entry_point.command()
@click.argument('description', nargs=-1)
def change(description):
    """Fixates a change adding a message to a changelog."""
    Project().add_change(description)
    click.secho('Done', fg='green')


def main():
    try:
        entry_point(obj={})

    except MakeappException as e: