ScriptCollection 4.4.6__py3-none-any.whl → 4.4.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +21 -3
- {scriptcollection-4.4.6.dist-info → scriptcollection-4.4.7.dist-info}/METADATA +1 -1
- {scriptcollection-4.4.6.dist-info → scriptcollection-4.4.7.dist-info}/RECORD +7 -7
- {scriptcollection-4.4.6.dist-info → scriptcollection-4.4.7.dist-info}/WHEEL +0 -0
- {scriptcollection-4.4.6.dist-info → scriptcollection-4.4.7.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.4.6.dist-info → scriptcollection-4.4.7.dist-info}/top_level.txt +0 -0
|
@@ -190,6 +190,20 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
190
190
|
self._protected_sc.log.log(f"The dependencies of codeunit \"{codeunit_name}\" are not restored in locked mode for the runtime \"{runtime}\", because the following lock-file(s) do not exist yet: {', '.join(missing_lock_files)}. The restore creates them now; commit them so that the dependencies of this codeunit are pinned.", LogLevel.Warning)
|
|
191
191
|
return result
|
|
192
192
|
|
|
193
|
+
@GeneralUtilities.check_arguments
|
|
194
|
+
def __get_arguments_which_prevent_writing_a_lock_file(self) -> list[str]:
|
|
195
|
+
"""Returns the arguments which keep a dotnet-operation from writing a lock-file.
|
|
196
|
+
|
|
197
|
+
The lock-files belong to the restore of the build alone, because only there the runtime - and with it the name of the
|
|
198
|
+
lock-file which belongs to that runtime - is known. Every other dotnet-operation of a codeunit (linting, test, ...)
|
|
199
|
+
works on the solution instead of on one runtime and restores implicitly, and the csproj-property
|
|
200
|
+
"RestorePackagesWithLockFile" would make each of those restores write a lock-file under the default-name. Such a file
|
|
201
|
+
is never validated against anything, because locked mode is only requested for the runtime-specific one, so it would
|
|
202
|
+
only be an additional file which looks like the relevant pinning without being it. The value has to be passed on the
|
|
203
|
+
command-line because a property which the project-file sets explicitly wins over one which comes from the
|
|
204
|
+
environment."""
|
|
205
|
+
return ["-p:RestorePackagesWithLockFile=false"]
|
|
206
|
+
|
|
193
207
|
@GeneralUtilities.check_arguments
|
|
194
208
|
def __standardized_tasks_build_for_dotnet_build(self, csproj_file: str, originaloutputfolder: str, files_to_sign: dict[str, str], commitid: str, runtimes: list[str], target_environmenttype_mapping: dict[str, str], copy_license_file_to_target_folder: bool, repository_folder: str, codeunit_name: str) -> None:
|
|
195
209
|
self._protected_sc.assert_is_git_repository(repository_folder)
|
|
@@ -319,7 +333,11 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
319
333
|
self._protected_sc.log.log("Generate SBOM...")
|
|
320
334
|
codeunit_name = os.path.basename(codeunit_folder)
|
|
321
335
|
bomfile_folder = "Other/Artifacts/BOM"
|
|
322
|
-
|
|
336
|
+
# "-dpr" keeps CycloneDX from restoring the project itself. The SBOM is generated directly after the project and its
|
|
337
|
+
# test-project were built, so the dependencies are restored and the assets-file CycloneDX reads is up-to-date already.
|
|
338
|
+
# Its restore would also not be able to name the lock-file of the runtime the build used, so it would write one under
|
|
339
|
+
# the default-name (see __get_arguments_which_prevent_writing_a_lock_file).
|
|
340
|
+
self._protected_sc.run_program_argsasarray("dotnet", ["CycloneDX", f"{codeunit_name}/{codeunit_name}.csproj", "-o", bomfile_folder, "-dpr"], codeunit_folder)
|
|
323
341
|
codeunitversion = self.tfcps_Tools_General.get_version_of_codeunit(os.path.join(codeunit_folder, f"{codeunit_name}.codeunit.xml"))
|
|
324
342
|
target = f"{codeunit_folder}/{bomfile_folder}/{codeunit_name}.{codeunitversion}.sbom.xml"
|
|
325
343
|
GeneralUtilities.ensure_file_does_not_exist(target)
|
|
@@ -351,7 +369,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
351
369
|
# begin with a drive-letter anymore) and resolves against the working-directory, so it writes to a path
|
|
352
370
|
# which contains a quote in the middle. On Linux that only creates a strangely named folder, on Windows a
|
|
353
371
|
# quote is not allowed in a path and the msbuild-task GenerateDepsFile fails with an IOException.
|
|
354
|
-
run_result = self._protected_sc.run_program_argsasarray("dotnet", ["build", sln_file, "-nologo", "-v", "minimal", "-o", temp_output_folder], temp_output_folder, throw_exception_if_exitcode_is_not_zero=False, env_vars={"DOTNET_CLI_UI_LANGUAGE": "en-US", "MSBUILDDISABLENODEREUSE": "1"})
|
|
372
|
+
run_result = self._protected_sc.run_program_argsasarray("dotnet", ["build", sln_file, "-nologo", "-v", "minimal", "-o", temp_output_folder]+self.__get_arguments_which_prevent_writing_a_lock_file(), temp_output_folder, throw_exception_if_exitcode_is_not_zero=False, env_vars={"DOTNET_CLI_UI_LANGUAGE": "en-US", "MSBUILDDISABLENODEREUSE": "1"})
|
|
355
373
|
finally:
|
|
356
374
|
GeneralUtilities.ensure_directory_does_not_exist(temp_output_folder)
|
|
357
375
|
diagnostics: list[tuple[LogLevel, str, str | None, int | None]] = []
|
|
@@ -676,7 +694,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
676
694
|
GeneralUtilities.ensure_file_does_not_exist(target_file)
|
|
677
695
|
|
|
678
696
|
sln_file = os.path.join(codeunit_folder, f"{codeunit_name}.sln")
|
|
679
|
-
args: list[str] = ["test", sln_file, "-c", dotnet_build_configuration, "-o", temp_folder]
|
|
697
|
+
args: list[str] = ["test", sln_file, "-c", dotnet_build_configuration, "-o", temp_folder]+self.__get_arguments_which_prevent_writing_a_lock_file()
|
|
680
698
|
runsettings_path = os.path.join(codeunit_folder, runsettings_file)
|
|
681
699
|
if os.path.isfile(runsettings_path):
|
|
682
700
|
args += ["--settings", runsettings_path]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.7
|
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
5
|
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
|
|
|
9
9
|
ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=ot9Ib-plQ8wejR9M2XXfnx6GR-va9k8SH1gAC5kjaJ0,5123
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=Fjf8Pdi63cXHGMxL_aI6A0dwGm7QIfrv3czjvpSUlaM,4705
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=4IN5E65UNrDvVHGsY3_sJwvQDG8KD6CT8P-GncKGCnU,261810
|
|
13
13
|
ScriptCollection/TestKind.py,sha256=EBTLR8yBz5VmWA2NZIpDTbQNg6tkfv_kAsIzEJ--mCI,1756
|
|
14
14
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
|
|
15
15
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -55,7 +55,7 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
55
55
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
|
56
56
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
|
57
57
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
|
58
|
-
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=
|
|
58
|
+
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=9KUJLrYqEXV-h-AR4gde2u-KX-JXwtb0BNJ9OyuUEnM,56266
|
|
59
59
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=cAE_OFJBU0M3L2Ov5PUUMH7aOVVzKtnKlFoXSw43fng,8759
|
|
61
61
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -71,8 +71,8 @@ ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=yyjWPMHQjPLkML
|
|
|
71
71
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
72
|
ScriptCollection/TFCPS/TypeScript/TFCPS_CodeUnitSpecific_TypeScript.py,sha256=5z990qyO5durX07xRWRwju1hl6wpjQAy2f-yRwJ-7s0,11856
|
|
73
73
|
ScriptCollection/TFCPS/TypeScript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
-
scriptcollection-4.4.
|
|
75
|
-
scriptcollection-4.4.
|
|
76
|
-
scriptcollection-4.4.
|
|
77
|
-
scriptcollection-4.4.
|
|
78
|
-
scriptcollection-4.4.
|
|
74
|
+
scriptcollection-4.4.7.dist-info/METADATA,sha256=5y2_0Sm-72umOq5J_sIxlr1jUHBkojCPxY12-H_NfEY,7647
|
|
75
|
+
scriptcollection-4.4.7.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
76
|
+
scriptcollection-4.4.7.dist-info/entry_points.txt,sha256=Aj6CHuJxASMe52fK_O6-bNJ_uhxcDb-AgRxFOeTojyE,6069
|
|
77
|
+
scriptcollection-4.4.7.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
78
|
+
scriptcollection-4.4.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|