Improved publisher

This commit is contained in:
2020-12-15 17:27:52 +01:00
parent 6f82bd8b35
commit 7ee2eff483
7 changed files with 41 additions and 21 deletions

View File

@@ -11,7 +11,7 @@
"ConsoleLogLevel": "TRACE",
"FileLogLevel": "TRACE"
},
"PublisherSettings": {
"PublishSettings": {
"SourcePath": "../",
"DistPath": "../../dist",
"Templates": [
@@ -27,9 +27,9 @@
"Title": "",
"Author": "Sven Heidemann",
"Version": {
"major": 2020,
"minor": 12,
"micro": 9
"Major": 2020,
"Minor": 12,
"Micro": 9
}
},
{
@@ -44,9 +44,9 @@
"Title": "",
"Author": "Sven Heidemann",
"Version": {
"major": 2020,
"minor": 12,
"micro": 9
"Major": 2020,
"Minor": 12,
"Micro": 9
}
}
],

View File

@@ -1,6 +1,7 @@
from typing import Optional
from sh_edraft.configuration.base import ConfigurationBase
from sh_edraft.console import Console
from sh_edraft.hosting import ApplicationHost
from sh_edraft.hosting.base import ApplicationBase
from sh_edraft.logging import Logger
@@ -20,6 +21,7 @@ class Program(ApplicationBase):
self._configuration: Optional[ConfigurationBase] = None
self._logger: Optional[LoggerBase] = None
self._publisher: Optional[PublisherBase] = None
# Console.disable()
def create_application_host(self):
self._app_host = ApplicationHost()
@@ -36,6 +38,7 @@ class Program(ApplicationBase):
def create_services(self):
# Add and create logger
Console.enable()
self._services.add_singleton(LoggerBase, Logger)
self._logger = self._services.get_service(LoggerBase)
@@ -48,10 +51,12 @@ class Program(ApplicationBase):
self._logger.debug(__name__, f'Host: {self._configuration.environment.host_name}')
self._logger.debug(__name__, f'Environment: {self._configuration.environment.environment_name}')
self._logger.debug(__name__, f'Customer: {self._configuration.environment.customer}')
#self._publisher.exclude()
#self._publisher.include()
self._publisher.exclude('../tests')
self._publisher.exclude('../tests_dev')
# self._publisher.include()
# self._publisher.create()
print(self._publisher)
self._publisher.create()
self._publisher.publish()
if __name__ == '__main__':