2021.4.post1 #31

Merged
edraft merged 92 commits from 2021.4.post1 into master 2021-05-19 09:00:40 +02:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 34ed7123d1 - Show all commits

View File

@ -22,8 +22,8 @@ class ApplicationEnvironment(ApplicationEnvironmentABC):
self._start_time: datetime = datetime.now() self._start_time: datetime = datetime.now()
self._end_time: datetime = datetime.now() self._end_time: datetime = datetime.now()
self._working_directory = os.path.abspath('./')
self._runtime_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) self._runtime_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
self._working_directory = os.path.abspath('./')
@property @property
def environment_name(self) -> str: def environment_name(self) -> str:
@ -82,11 +82,13 @@ class ApplicationEnvironment(ApplicationEnvironmentABC):
self._runtime_directory = runtime_directory self._runtime_directory = runtime_directory
return return
self._runtime_directory = pathlib.Path().absolute() self._runtime_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def set_working_directory(self, working_directory: str): def set_working_directory(self, working_directory: str):
if working_directory != '': if working_directory != '':
self._working_directory = working_directory self._working_directory = working_directory
os.chdir(self._working_directory)
return return
self._working_directory = pathlib.Path().absolute() self._working_directory = os.path.abspath('./')
os.chdir(self._working_directory)

View File

@ -408,6 +408,7 @@ class PublisherService(PublisherABC):
3. Copies all included source files to dist_path/build 3. Copies all included source files to dist_path/build
:return: :return:
""" """
self._env.set_working_directory(os.path.join(self._env.working_directory, '../'))
self.exclude(f'*/{self._config.get_configuration("ProjectName")}.json') self.exclude(f'*/{self._config.get_configuration("ProjectName")}.json')
self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build')) self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build'))
@ -429,6 +430,7 @@ class PublisherService(PublisherABC):
4. Remove all included source from dist_path/publish 4. Remove all included source from dist_path/publish
:return: :return:
""" """
self._env.set_working_directory(os.path.join(self._env.working_directory, '../'))
self.exclude(f'*/{self._config.get_configuration("ProjectName")}.json') self.exclude(f'*/{self._config.get_configuration("ProjectName")}.json')
self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish')) self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish'))