diff --git a/Other/Resources/Changelog/v3.3.14.md b/Other/Resources/Changelog/v3.3.14.md index b101b1d9..47a2fb80 100644 --- a/Other/Resources/Changelog/v3.3.14.md +++ b/Other/Resources/Changelog/v3.3.14.md @@ -3,4 +3,4 @@ ## Changes - Forced repositories to have a changelog. -- Added changelog as release-notes to github-release +- Added changelog as release-notes to GitHub-release. diff --git a/Other/Resources/Changelog/v3.3.15.md b/Other/Resources/Changelog/v3.3.15.md new file mode 100644 index 00000000..71ab70b3 --- /dev/null +++ b/Other/Resources/Changelog/v3.3.15.md @@ -0,0 +1,6 @@ +# Release notes + +## Changes + +- The `bin`- and `obj`-folder for .NET-builds will now be removed before the project will be built. +- Added `t4_transform` diff --git a/ScriptCollection/ScriptCollection.codeunit.xml b/ScriptCollection/ScriptCollection.codeunit.xml index 222f0df6..39c8243d 100644 --- a/ScriptCollection/ScriptCollection.codeunit.xml +++ b/ScriptCollection/ScriptCollection.codeunit.xml @@ -2,7 +2,7 @@ ScriptCollection - 3.3.14 + 3.3.15 30 \ No newline at end of file diff --git a/ScriptCollection/ScriptCollection/ScriptCollectionCore.py b/ScriptCollection/ScriptCollection/ScriptCollectionCore.py index 9cc2526c..29db333f 100644 --- a/ScriptCollection/ScriptCollection/ScriptCollectionCore.py +++ b/ScriptCollection/ScriptCollection/ScriptCollectionCore.py @@ -25,7 +25,7 @@ from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument -version = "3.3.14" +version = "3.3.15" __version__ = version diff --git a/ScriptCollection/ScriptCollection/TasksForCommonProjectStructure.py b/ScriptCollection/ScriptCollection/TasksForCommonProjectStructure.py index 0b5f3bc2..452b783d 100644 --- a/ScriptCollection/ScriptCollection/TasksForCommonProjectStructure.py +++ b/ScriptCollection/ScriptCollection/TasksForCommonProjectStructure.py @@ -300,6 +300,17 @@ def update_version_of_codeunit_to_project_version(self, common_tasks_file: str, codeunit_file: str = os.path.join(GeneralUtilities.resolve_relative_path("..", os.path.dirname(common_tasks_file)), f"{codeunit_name}.codeunit.xml") self.write_version_to_codeunit_file(codeunit_file, current_version) + @GeneralUtilities.check_arguments + def t4_transform(self, commontasks_script_file_of_current_file: str, verbosity: int): + sc = ScriptCollectionCore() + codeunit_folder: str = str(Path(os.path.dirname(commontasks_script_file_of_current_file)).parent.absolute()) + codeunitname: str = os.path.basename(str(Path(os.path.dirname(commontasks_script_file_of_current_file)).parent.absolute())) + csproj_folder = os.path.join(codeunit_folder, codeunitname) + for search_result in Path(csproj_folder).glob('**/*.tt'): + tt_file = str(search_result) + relative_path_to_tt_file = str(Path(tt_file).relative_to(Path(csproj_folder))) + sc.run_program("texttransform", relative_path_to_tt_file, csproj_folder, verbosity=verbosity) + @GeneralUtilities.check_arguments def standardized_tasks_generate_reference_by_docfx(self, generate_reference_script_file: str, verbosity: int, targetenvironmenttype: str, commandline_arguments: list[str]) -> None: verbosity = TasksForCommonProjectStructure.get_verbosity_from_commandline_arguments(commandline_arguments, verbosity) @@ -321,6 +332,8 @@ def __standardized_tasks_build_for_dotnet_build(self, csproj_file: str, buildcon csproj_file_folder = os.path.dirname(csproj_file) csproj_file_name = os.path.basename(csproj_file) self.__sc.run_program("dotnet", "clean", csproj_file_folder, verbosity=verbosity) + GeneralUtilities.ensure_directory_does_not_exist(os.path.join(csproj_file_folder, "bin")) + GeneralUtilities.ensure_directory_does_not_exist(os.path.join(csproj_file_folder, "obj")) GeneralUtilities.ensure_directory_does_not_exist(outputfolder) GeneralUtilities.ensure_directory_exists(outputfolder) # TODO pass commitid, timestamp and if desired something like keypair, certificate to the src-code @@ -943,6 +956,14 @@ def do_npm_install(self, package_json_folder: str, verbosity: int): sc.program_runner = ProgramRunnerEpew() sc.run_program("npm", "install", package_json_folder, verbosity=verbosity) + @GeneralUtilities.check_arguments + def generate_openapi_file(self, buildscript_file: str, runtime: str) -> None: + codeunitname = os.path.basename(str(Path(os.path.dirname(buildscript_file)).parent.parent.absolute())) + repository_folder = str(Path(os.path.dirname(buildscript_file)).parent.parent.parent.absolute()) + artifacts_folder = os.path.join(repository_folder, codeunitname, "Other", "Artifacts") + sc = ScriptCollectionCore() + sc.run_program("swagger", f"tofile --output APISpecification\\{codeunitname}.api.json BuildResult_DotNet_{runtime}\\{codeunitname}.dll v1", artifacts_folder) + @GeneralUtilities.check_arguments def replace_version_in_package_file(self: ScriptCollectionCore, package_json_file: str, version: str): filename = package_json_file diff --git a/ScriptCollection/pyproject.toml b/ScriptCollection/pyproject.toml index 3d6355d1..105be995 100644 --- a/ScriptCollection/pyproject.toml +++ b/ScriptCollection/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "ScriptCollection" dynamic = ["readme"] -version = "3.3.14" +version = "3.3.15" authors = [ { name="Marius Göcke", email="marius.goecke@gmail.com" }, ]