ScriptCollection 4.0.38__py3-none-any.whl → 4.0.40__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 +4 -3
- ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py +0 -3
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +3 -0
- ScriptCollection/TFCPS/TFCPS_Tools_General.py +54 -0
- {scriptcollection-4.0.38.dist-info → scriptcollection-4.0.40.dist-info}/METADATA +1 -1
- {scriptcollection-4.0.38.dist-info → scriptcollection-4.0.40.dist-info}/RECORD +10 -10
- {scriptcollection-4.0.38.dist-info → scriptcollection-4.0.40.dist-info}/WHEEL +0 -0
- {scriptcollection-4.0.38.dist-info → scriptcollection-4.0.40.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.0.38.dist-info → scriptcollection-4.0.40.dist-info}/top_level.txt +0 -0
@@ -291,7 +291,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
291
291
|
<PropertyGroup Condition=\\\"'\\$\\(Configuration\\)'=='Productive'\\\">
|
292
292
|
<DebugType>portable<\\/DebugType>
|
293
293
|
<DebugSymbols>true<\\/DebugSymbols>
|
294
|
-
<Optimize>
|
294
|
+
<Optimize>true<\\/Optimize>
|
295
295
|
<DefineConstants>Productive<\\/DefineConstants>
|
296
296
|
<ErrorReport>none<\\/ErrorReport>
|
297
297
|
<\\/PropertyGroup>(\\n|.)*
|
@@ -355,7 +355,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
355
355
|
<PropertyGroup Condition=\\\"'\\$\\(Configuration\\)'=='Productive'\\\">
|
356
356
|
<DebugType>portable<\\/DebugType>
|
357
357
|
<DebugSymbols>true<\\/DebugSymbols>
|
358
|
-
<Optimize>
|
358
|
+
<Optimize>true<\\/Optimize>
|
359
359
|
<DefineConstants>Productive<\\/DefineConstants>
|
360
360
|
<ErrorReport>none<\\/ErrorReport>
|
361
361
|
<\\/PropertyGroup>(\\n|.)*
|
@@ -400,7 +400,8 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
400
400
|
@GeneralUtilities.check_arguments
|
401
401
|
def update_dependencies(self) -> None:
|
402
402
|
self.update_year_for_dotnet_codeunit()
|
403
|
-
|
403
|
+
csproj_file:str=os.path.join(self.get_codeunit_folder(), self.get_codeunit_name(), self.get_codeunit_name() + ".csproj")
|
404
|
+
self._protected_sc.update_dependencies_of_dotnet_project(csproj_file,[])#TODO set ignored codeunits
|
404
405
|
|
405
406
|
@GeneralUtilities.check_arguments
|
406
407
|
def update_year_for_dotnet_codeunit(self) -> None:
|
@@ -197,9 +197,6 @@ class TFCPS_CodeUnitSpecific_Base(ABC):
|
|
197
197
|
|
198
198
|
# Generate diff-report
|
199
199
|
self.tfcps_Tools_General.generate_diff_report(repository_folder, codeunit_name, self.tfcps_Tools_General.get_version_of_codeunit(self.get_codeunit_file()))
|
200
|
-
|
201
|
-
# TODO check for secrets using TruffleHog
|
202
|
-
# TODO run static code analysis tool to search for vulnerabilities
|
203
200
|
|
204
201
|
d:TFCPS_Tools_Dependencies=TFCPS_Tools_Dependencies()
|
205
202
|
dependencies:list[Dependency]=d.get_dependencies()
|
@@ -61,6 +61,9 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
61
61
|
from_day = datetime(now.year, now.month, now.day, 0, 0, 0)
|
62
62
|
self.tFCPS_Other.mark_current_version_as_supported(self.repository,project_version,from_day,until_day)
|
63
63
|
|
64
|
+
#TODO search for secrets using TruffleHog
|
65
|
+
#TODO run static code analysis tool to search for vulnerabilities
|
66
|
+
|
64
67
|
codeunits:list[str]=self.tFCPS_Other.get_codeunits(self.repository)
|
65
68
|
self.sc.log.log("Codeunits will be built in the following order:")
|
66
69
|
for codeunit_name in codeunits:
|
@@ -1103,3 +1103,57 @@ class TFCPS_Tools_General:
|
|
1103
1103
|
artifact_files.append(additional_attached_file)
|
1104
1104
|
changelog_file = os.path.join(repository_folder, "Other", "Resources", "Changelog", f"v{projectversion}.md")
|
1105
1105
|
self.__sc.run_program_argsasarray("gh", ["release", "create", f"v{projectversion}", "--repo", github_repo, "--notes-file", changelog_file, "--title", f"Release v{projectversion}"]+artifact_files)
|
1106
|
+
|
1107
|
+
@GeneralUtilities.check_arguments
|
1108
|
+
def update_dependency_in_resources_folder(self, update_dependencies_file, dependency_name: str, latest_version_function: str) -> None:
|
1109
|
+
dependency_folder = GeneralUtilities.resolve_relative_path(f"../Resources/Dependencies/{dependency_name}", update_dependencies_file)
|
1110
|
+
version_file = os.path.join(dependency_folder, "Version.txt")
|
1111
|
+
version_file_exists = os.path.isfile(version_file)
|
1112
|
+
write_to_file = False
|
1113
|
+
if version_file_exists:
|
1114
|
+
current_version = GeneralUtilities.read_text_from_file(version_file)
|
1115
|
+
if current_version != latest_version_function:
|
1116
|
+
write_to_file = True
|
1117
|
+
else:
|
1118
|
+
GeneralUtilities.ensure_directory_exists(dependency_folder)
|
1119
|
+
GeneralUtilities.ensure_file_exists(version_file)
|
1120
|
+
write_to_file = True
|
1121
|
+
if write_to_file:
|
1122
|
+
GeneralUtilities.write_text_to_file(version_file, latest_version_function)
|
1123
|
+
|
1124
|
+
|
1125
|
+
@GeneralUtilities.check_arguments
|
1126
|
+
def push_docker_build_artifact(self, push_artifacts_file: str, registry: str, push_readme: bool, repository_folder_name: str, remote_image_name: str = None) -> None:
|
1127
|
+
folder_of_this_file = os.path.dirname(push_artifacts_file)
|
1128
|
+
filename = os.path.basename(push_artifacts_file)
|
1129
|
+
codeunitname_regex: str = "([a-zA-Z0-9]+)"
|
1130
|
+
filename_regex: str = f"PushArtifacts\\.{codeunitname_regex}\\.py"
|
1131
|
+
if match := re.search(filename_regex, filename, re.IGNORECASE):
|
1132
|
+
codeunitname = match.group(1)
|
1133
|
+
else:
|
1134
|
+
raise ValueError(f"Expected push-artifacts-file to match the regex \"{filename_regex}\" where \"{codeunitname_regex}\" represents the codeunit-name.")
|
1135
|
+
|
1136
|
+
repository_folder = GeneralUtilities.resolve_relative_path(f"..{os.path.sep}..{os.path.sep}Submodules{os.path.sep}{repository_folder_name}", folder_of_this_file)
|
1137
|
+
codeunit_folder = os.path.join(repository_folder, codeunitname)
|
1138
|
+
artifacts_folder = os.path.join(repository_folder,codeunitname, "Other", "Artifacts")
|
1139
|
+
applicationimage_folder = os.path.join(artifacts_folder, "BuildResult_OCIImage")
|
1140
|
+
image_file = self.__sc.find_file_by_extension(applicationimage_folder, "tar")
|
1141
|
+
image_filename = os.path.basename(image_file)
|
1142
|
+
codeunit_version = self.get_version_of_codeunit(os.path.join(codeunit_folder, f"{codeunitname}.codeunit.xml"))
|
1143
|
+
if remote_image_name is None:
|
1144
|
+
remote_image_name = codeunitname
|
1145
|
+
remote_image_name = remote_image_name.lower()
|
1146
|
+
local_image_name = codeunitname.lower()
|
1147
|
+
remote_repo = f"{registry}/{remote_image_name}"
|
1148
|
+
remote_image_latest = f"{remote_repo}:latest"
|
1149
|
+
remote_image_version = f"{remote_repo}:{codeunit_version}"
|
1150
|
+
self.__sc.log.log("Load image...")
|
1151
|
+
self.__sc.run_program("docker", f"load --input {image_filename}", applicationimage_folder)
|
1152
|
+
self.__sc.log.log("Tag image...")
|
1153
|
+
self.__sc.run_program_with_retry("docker", f"tag {local_image_name}:{codeunit_version} {remote_image_latest}")
|
1154
|
+
self.__sc.run_program_with_retry("docker", f"tag {local_image_name}:{codeunit_version} {remote_image_version}")
|
1155
|
+
self.__sc.log.log("Push image...")
|
1156
|
+
self.__sc.run_program_with_retry("docker", f"push {remote_image_latest}")
|
1157
|
+
self.__sc.run_program_with_retry("docker", f"push {remote_image_version}")
|
1158
|
+
if push_readme:
|
1159
|
+
self.__sc.run_program_with_retry("docker-pushrm", f"{remote_repo}", codeunit_folder)
|
@@ -9,25 +9,25 @@ ScriptCollection/ProgramRunnerEpew.py,sha256=TJdDx9zIMSiCaXh8X-ekrMlbXfGtmd0Mmyx
|
|
9
9
|
ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrRjAPIwT5Y,37
|
10
10
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
11
11
|
ScriptCollection/SCLog.py,sha256=dxGOI4E9lG5v9jk_LajXCkM5nghliCDV8YB8Ihn160s,4541
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=C0Em7Srf_-HOWBvuVJf1mbzMQw7VSy2HFc-Zn4N1IBI,141223
|
13
13
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=
|
14
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=E7QtV1y5ZUFPO3Jfn04__KBRwOlOisB3Z0ByvMwc0rA,25853
|
15
15
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=4rYKgTAga11NiDx8YUqz3K_Q4eX_n3kC6lvNdXEa24s,7389
|
16
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
16
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=h3PWj7SgJF9huMognPpfNwGb9E9Y9HQ0Ym72yvvJwwg,5676
|
17
17
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=bcJlfI062Eoq7MOIhun-_iNG7SdO1ZIuC_cylaoLI1s,6332
|
18
18
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=O-0guM_LJCcZmPZJhMgTvXD2RXUJEBWWv6Bt6hDFhvM,1943
|
19
19
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=41g219jaBRZ2VQCrWM4-Trvervrt8b5oATPwIIGNpag,7244
|
20
20
|
ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=ifB1K6A903vvfH0LvtiFbZgYSgR94thfEI-jjf40LpU,21653
|
21
21
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=CxdwUklhZVuJGp0vcokoH_KMXFzmlUlZwj77xFYijho,2242
|
22
22
|
ScriptCollection/TFCPS/TFCPS_Tools_Dependencies.py,sha256=o7HI3ki3WWqlAiUsrh3Lky_w6UhYh9hdjYPGOhubQGA,414
|
23
|
-
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=
|
23
|
+
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=cRPJqw5sC1hQbGI-hoDPGC5BLf3ngnRGn_sOYc6C5hA,72994
|
24
24
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
25
|
ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=-g8h2gCf9rh0KJXUBeQD5d0qLJgBU3Q8DNZXM1UXC04,5259
|
26
26
|
ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
28
28
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
29
29
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
30
|
-
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=
|
30
|
+
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=S1LPpQf_F3yLpNPuwMdYqm_Ns8nad6czJmfdohFVsE4,30999
|
31
31
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=6g1xZ6_Nnr0Xa2VvSEtMg0H1hjUCvjzXXaPHFJ2xD1o,1626
|
33
33
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -35,8 +35,8 @@ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=dnuDlQXThF
|
|
35
35
|
ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
36
|
ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=q7msAxCb5VIZ-xhFg1MfzUvWomQRKYldqmW42KFhyMU,6868
|
37
37
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
|
-
scriptcollection-4.0.
|
39
|
-
scriptcollection-4.0.
|
40
|
-
scriptcollection-4.0.
|
41
|
-
scriptcollection-4.0.
|
42
|
-
scriptcollection-4.0.
|
38
|
+
scriptcollection-4.0.40.dist-info/METADATA,sha256=19q2n1a_anZYXTHeu8hGCmWSOTQRZ0ykarYQx7oMmRY,7688
|
39
|
+
scriptcollection-4.0.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
40
|
+
scriptcollection-4.0.40.dist-info/entry_points.txt,sha256=NeU26D6q7d8n2cmKQiOvHK21w1C7D2kxoNRJaKiyZ5w,4295
|
41
|
+
scriptcollection-4.0.40.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
42
|
+
scriptcollection-4.0.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|