Skip to content

Commit

Permalink
Merge branch other/next-release into main
Browse files Browse the repository at this point in the history
  • Loading branch information
anionDev committed Nov 22, 2022
2 parents 1870c9c + 950fb42 commit 7af8cfe
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Other/Resources/Changelog/v3.3.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 6 additions & 0 deletions Other/Resources/Changelog/v3.3.15.md
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion ScriptCollection/ScriptCollection.codeunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeunit:codeunit xmlns:codeunit="https://github.com/anionDev/ProjectTemplates" codeunitspecificationversion="1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://raw.githubusercontent.com/anionDev/ProjectTemplates/main/Templates/Conventions/RepositoryStructure/CommonProjectStructure/codeunit.xsd">
<codeunit:name>ScriptCollection</codeunit:name>
<codeunit:version>3.3.14</codeunit:version>
<codeunit:version>3.3.15</codeunit:version>
<codeunit:minimalcodecoverageinpercent>30</codeunit:minimalcodecoverageinpercent>
<codeunit:dependentcodeunits></codeunit:dependentcodeunits>
</codeunit:codeunit>
2 changes: 1 addition & 1 deletion ScriptCollection/ScriptCollection/ScriptCollectionCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument


version = "3.3.14"
version = "3.3.15"
__version__ = version


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ScriptCollection/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" },
]
Expand Down

0 comments on commit 7af8cfe

Please sign in to comment.