Unverified Commit 1bc9cdcb authored by Sébastien Eustace's avatar Sébastien Eustace
Browse files

Add the publish command

parent 63bb882e
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
- Added support for extras definition.
- Added support for dependencies extras specification.
- Added the `config` command.
- Added the `publish` command.

### Changed

+2 −0
Changes for poetry/console/application.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ from .commands import ConfigCommand
from .commands import InstallCommand
from .commands import LockCommand
from .commands import NewCommand
from .commands import PublishCommand
from .commands import RemoveCommand
from .commands import ShowCommand
from .commands import UpdateCommand
@@ -52,6 +53,7 @@ class Application(BaseApplication):
            InstallCommand(),
            LockCommand(),
            NewCommand(),
            PublishCommand(),
            RemoveCommand(),
            ShowCommand(),
            UpdateCommand(),
+1 −0
Changes for poetry/console/commands/__init__.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ from .config import ConfigCommand
from .install import InstallCommand
from .lock import LockCommand
from .new import NewCommand
from .publish import PublishCommand
from .remove import RemoveCommand
from .show import ShowCommand
from .update import UpdateCommand
+0 −1
Changes for poetry/console/commands/build.py: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ class BuildCommand(Command):
        package = self.poetry.package
        self.line(f'Building <info>{package.pretty_name}</> '
                  f'(<comment>{package.version}</>)')
        self.line('')

        builder = Builder(self.poetry, self.output)
        builder.build(fmt)
+16 −0
Changes for poetry/console/commands/command.py: 16 added lines, 0 removed lines.
Original line number Diff line number Diff line
from cleo import Command as BaseCommand
from cleo.inputs import ListInput

from poetry.poetry import Poetry

@@ -14,6 +15,21 @@ class Command(BaseCommand):
    def reset_poetry(self) -> None:
        self.get_application().reset_poetry()

    def call(self, name, options=None):
        """
        Call another command.

        Fixing style being passed rather than an output
        """
        if options is None:
            options = []

        command = self.get_application().find(name)

        options = [('command', command.get_name())] + options

        return command.run(ListInput(options), self.output.output)

    def run(self, i, o) -> int:
        """
        Initialize command.
Loading