Added publish command to cli

This commit is contained in:
2020-12-16 18:14:11 +01:00
parent 09eb3a41d6
commit a6122536a6
7 changed files with 116 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
from sh_edraft.cli.command.base.command_base import CommandBase
from sh_edraft.cli.cpl_cli.commands.publish.app import PublishApp
from sh_edraft.console.console import Console
class Publish(CommandBase):
def __init__(self):
CommandBase.__init__(self)
self._app = PublishApp()
self._aliases.append('-b')
self._aliases.append('-B')
def run(self, args: list[str]):
if len(args) > 0:
Console.error(f'Invalid arguments {args}')
Console.error('Run \'cpl help\'')
self._app.create_application_host()
self._app.create_configuration()
self._app.create_services()
self._app.main()