diff --git a/builder-tool/src/builderTool.py b/builder-tool/src/builderTool.py index a984f4b..999da70 100644 --- a/builder-tool/src/builderTool.py +++ b/builder-tool/src/builderTool.py @@ -138,6 +138,17 @@ def __init__(self): Logger.debug('Using temporary directory: ' + os.path.abspath(self.args.temp_dir)) Logger.debug('Using distribution directory: ' + os.path.abspath(self.args.dist_dir)) + # clear the dist directory + try: + shutil.rmtree(self.args.dist_dir) + except FileNotFoundError: + pass + except Exception as e: + Logger.error('Error while cleaning dist directory: ' + str(e)) + sys.exit(1) + + os.makedirs(self.args.dist_dir, exist_ok=True) + @property def tempDir(self): return os.path.abspath(self.args.temp_dir) diff --git a/create-module/src/createModule.py b/create-module/src/createModule.py index 0946960..ba399c6 100644 --- a/create-module/src/createModule.py +++ b/create-module/src/createModule.py @@ -40,12 +40,10 @@ def create(self): if self.step != Step.INITIATED: raise ValueError("Archive already created") - Logger.info(f"starting creation of archive {self.archiveName}") self.__checkFolderContent() self.zipFile = ZipFile(self.archiveName, 'w') self.__addCode() self.__createJson() - Logger.info(f"Archive {self.archiveName} created") self.step = Step.BUILT def __checkFolderContent(self):