ScriptCollection 4.3.3__py3-none-any.whl → 4.3.5__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/Executables.py +3 -3
- ScriptCollection/GeneralUtilities.py +22 -3
- ScriptCollection/ProgramRunnerPopen.py +6 -1
- ScriptCollection/ScriptCollectionCore.py +43 -5
- ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py +66 -0
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +14 -10
- {scriptcollection-4.3.3.dist-info → scriptcollection-4.3.5.dist-info}/METADATA +1 -1
- {scriptcollection-4.3.3.dist-info → scriptcollection-4.3.5.dist-info}/RECORD +11 -11
- {scriptcollection-4.3.3.dist-info → scriptcollection-4.3.5.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.3.dist-info → scriptcollection-4.3.5.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.3.3.dist-info → scriptcollection-4.3.5.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -290,9 +290,9 @@ def BuildCodeUnitsC() -> int:
|
|
|
290
290
|
GeneralUtilities.reconfigure_standard_input_and_outputs()
|
|
291
291
|
repo:str=GeneralUtilities.resolve_relative_path(args.repositoryfolder,os.getcwd())
|
|
292
292
|
verbosity=LogLevel(int(args.verbosity))
|
|
293
|
-
t:TFCPS_CodeUnit_BuildCodeUnits=TFCPS_CodeUnit_BuildCodeUnits(repo,verbosity,args.targetenvironment,args.additionalargumentsfile,not args.nocache,args.ispremerge,args.assertnonewchanges)
|
|
294
|
-
t.build_codeunits_in_container()
|
|
295
|
-
return 0
|
|
293
|
+
t:TFCPS_CodeUnit_BuildCodeUnits=TFCPS_CodeUnit_BuildCodeUnits(repo,verbosity,args.targetenvironment,args.additionalargumentsfile,not args.nocache,args.ispremerge,args.assertnonewchanges)
|
|
294
|
+
success, _ = t.build_codeunits_in_container()
|
|
295
|
+
return 0 if success else 1
|
|
296
296
|
|
|
297
297
|
def UpdateDependencies() -> int:
|
|
298
298
|
parser = argparse.ArgumentParser()
|
|
@@ -813,9 +813,12 @@ class GeneralUtilities:
|
|
|
813
813
|
@staticmethod
|
|
814
814
|
@check_arguments
|
|
815
815
|
def read_binary_from_file(file: str) -> bytes:
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
816
|
+
try:
|
|
817
|
+
file=GeneralUtilities.normalize_path(file)
|
|
818
|
+
with open(file, "rb") as file_object:
|
|
819
|
+
return file_object.read()
|
|
820
|
+
except Exception as e:
|
|
821
|
+
raise ValueError(f"Could not read file '{file}'.") from e
|
|
819
822
|
|
|
820
823
|
@staticmethod
|
|
821
824
|
@check_arguments
|
|
@@ -1181,6 +1184,22 @@ class GeneralUtilities:
|
|
|
1181
1184
|
temp_folder = "/tmp"
|
|
1182
1185
|
return temp_folder
|
|
1183
1186
|
|
|
1187
|
+
@staticmethod
|
|
1188
|
+
def _internal_with_absolute_temp_folder_environment_variables(environment: dict) -> dict:
|
|
1189
|
+
"""Returns a copy of the given environment-dictionary in which the temp-folder-environment-variables (TMPDIR/TMP/TEMP)
|
|
1190
|
+
are replaced by the absolute system-temp-folder if they are set to a relative value. This is required because spawned
|
|
1191
|
+
child-processes resolve their temp-folder via these variables (e.g. .NET-tools like the coverlet-collector or CycloneDX
|
|
1192
|
+
via Path.GetTempPath()); a relative value (as set in some Linux-build-containers) would otherwise make them create
|
|
1193
|
+
temp-content relative to their current working-directory (e.g. a leftover 'tmp/<guid>'-folder inside a codeunit-folder)
|
|
1194
|
+
instead of in the system-temp-folder."""
|
|
1195
|
+
result = dict(environment)
|
|
1196
|
+
absolute_temp_folder = GeneralUtilities.get_temp_folder()
|
|
1197
|
+
for temp_environment_variable_name in ("TMPDIR", "TMP", "TEMP"):
|
|
1198
|
+
value = result.get(temp_environment_variable_name)
|
|
1199
|
+
if value is not None and not os.path.isabs(value):
|
|
1200
|
+
result[temp_environment_variable_name] = absolute_temp_folder
|
|
1201
|
+
return result
|
|
1202
|
+
|
|
1184
1203
|
@staticmethod
|
|
1185
1204
|
@check_arguments
|
|
1186
1205
|
def get_line():
|
|
@@ -14,7 +14,12 @@ class ProgramRunnerPopen(ProgramRunnerBase):
|
|
|
14
14
|
# "shell=True" is not allowed because it is not recommended and also something like
|
|
15
15
|
# "ScriptCollectionCore().run_program('curl', 'https://example.com/dataset?id=1&format=json')"
|
|
16
16
|
# would not be possible anymore because the ampersand will be treated as shell-command.
|
|
17
|
-
|
|
17
|
+
# Always pass an explicit environment (instead of inheriting os.environ implicitly) so that relative
|
|
18
|
+
# temp-folder-environment-variables - which some Linux-build-containers set - are normalized to an absolute path.
|
|
19
|
+
# Otherwise spawned child-processes (e.g. .NET-tools resolving Path.GetTempPath()) would create temp-content
|
|
20
|
+
# relative to their working-directory (e.g. a leftover 'tmp/<guid>'-folder inside a codeunit-folder).
|
|
21
|
+
base_environment = GeneralUtilities._internal_with_absolute_temp_folder_environment_variables(os.environ)
|
|
22
|
+
env = {**base_environment, **env_vars} if env_vars is not None else base_environment
|
|
18
23
|
try:
|
|
19
24
|
if interactive:
|
|
20
25
|
result = Popen(arguments_for_process, cwd=working_directory, stdout=PIPE, stderr=PIPE, shell=False, text=True, stdin=sys.stdin, env=env) # pylint: disable=consider-using-with
|
|
@@ -37,7 +37,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
37
37
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
38
38
|
from .SCLog import SCLog, LogLevel
|
|
39
39
|
|
|
40
|
-
version = "4.3.
|
|
40
|
+
version = "4.3.5"
|
|
41
41
|
__version__ = version
|
|
42
42
|
|
|
43
43
|
class VSCodeWorkspaceShellTask:
|
|
@@ -569,9 +569,25 @@ class ScriptCollectionCore:
|
|
|
569
569
|
def git_pull_with_retry(self, folder: str, remote: str, localbranchname: str, remotebranchname: str, force: bool = False, amount_of_attempts: int = 5) -> None:
|
|
570
570
|
GeneralUtilities.retry_action(lambda: self.git_pull(folder, remote, localbranchname, remotebranchname), amount_of_attempts)
|
|
571
571
|
|
|
572
|
+
@GeneralUtilities.check_arguments
|
|
573
|
+
def git_branch_is_pullable(self, folder: str, remote: str, localbranchname: str, remotebranchname: str) -> bool:
|
|
574
|
+
"""Fetches remote and returns whether pulling remotebranchname into localbranchname would advance (fast-forward) the local-branch.
|
|
575
|
+
Returns True if the local-branch is behind the remote-branch (or equal to it).
|
|
576
|
+
Returns False if the local-branch is ahead of the remote-branch (or diverged from it), in which case a pull would do nothing useful and a normal pull would even fail with a non-fast-forward-error."""
|
|
577
|
+
self.is_git_or_bare_git_repository(folder)
|
|
578
|
+
self.git_fetch(folder, remote)
|
|
579
|
+
return self.git_commit_is_ancestor(folder, localbranchname, f"{remote}/{remotebranchname}")
|
|
580
|
+
|
|
572
581
|
@GeneralUtilities.check_arguments
|
|
573
582
|
def git_pull(self, folder: str, remote: str, localbranchname: str, remotebranchname: str, force: bool = False) -> None:
|
|
574
583
|
self.is_git_or_bare_git_repository(folder)
|
|
584
|
+
if not force and not self.is_bare_git_repository(folder):
|
|
585
|
+
# If the local-branch is already up-to-date with or ahead of the remote-branch there is nothing to pull and a normal
|
|
586
|
+
# pull would fail with a non-fast-forward-error. In that case do nothing. (Skipped for bare-repositories because
|
|
587
|
+
# those have no working-tree to update and git_fetch does not support them.)
|
|
588
|
+
if not self.git_branch_is_pullable(folder, remote, localbranchname, remotebranchname):
|
|
589
|
+
self.log.log(f"Skip pulling '{remotebranchname}' from '{remote}' into '{localbranchname}' in '{folder}' because the local-branch is not behind the remote-branch.", LogLevel.Debug)
|
|
590
|
+
return
|
|
575
591
|
argument = f"pull {remote} {remotebranchname}:{localbranchname}"
|
|
576
592
|
if force:
|
|
577
593
|
argument = f"{argument} --force"
|
|
@@ -645,7 +661,7 @@ class ScriptCollectionCore:
|
|
|
645
661
|
def git_unstage_all_changes(self, directory: str) -> None:
|
|
646
662
|
self.assert_is_git_repository(directory)
|
|
647
663
|
self.run_program_argsasarray("git", ["reset"], directory, throw_exception_if_exitcode_is_not_zero=True)
|
|
648
|
-
# TODO
|
|
664
|
+
# TODO ensure this will also be done for submodules
|
|
649
665
|
|
|
650
666
|
@GeneralUtilities.check_arguments
|
|
651
667
|
def git_stage_file(self, directory: str, file: str) -> None:
|
|
@@ -669,7 +685,7 @@ class ScriptCollectionCore:
|
|
|
669
685
|
self.assert_is_git_repository(directory)
|
|
670
686
|
self.run_program_argsasarray("git", ['clean', '-df'], directory, throw_exception_if_exitcode_is_not_zero=True)
|
|
671
687
|
self.run_program_argsasarray("git", ['checkout', '.'], directory, throw_exception_if_exitcode_is_not_zero=True)
|
|
672
|
-
# TODO
|
|
688
|
+
# TODO ensure this will also be done for submodules
|
|
673
689
|
|
|
674
690
|
@GeneralUtilities.check_arguments
|
|
675
691
|
def git_commit(self, directory: str, message: str = "Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0,commit_message_body:str=None) -> str:
|
|
@@ -749,8 +765,7 @@ class ScriptCollectionCore:
|
|
|
749
765
|
@GeneralUtilities.check_arguments
|
|
750
766
|
def merge_repository(self, repository_folder: str, remote: str, branch: str):
|
|
751
767
|
GeneralUtilities.assert_condition(not self.git_repository_has_uncommitted_changes(repository_folder),f"Can not merge. There are uncommitted changes in \"{repository_folder}\".")
|
|
752
|
-
self.
|
|
753
|
-
is_pullable: bool = self.git_commit_is_ancestor(repository_folder, branch, f"{remote}/{branch}")
|
|
768
|
+
is_pullable: bool = self.git_branch_is_pullable(repository_folder, remote, branch, branch)
|
|
754
769
|
if is_pullable:
|
|
755
770
|
self.git_pull(repository_folder, remote, branch, branch)
|
|
756
771
|
uncommitted_changes = self.git_repository_has_uncommitted_changes(repository_folder)
|
|
@@ -2333,6 +2348,26 @@ class ScriptCollectionCore:
|
|
|
2333
2348
|
result = "0.1.0"
|
|
2334
2349
|
return result
|
|
2335
2350
|
|
|
2351
|
+
@GeneralUtilities.check_arguments
|
|
2352
|
+
def get_real_git_folder(self,repository_folder:str) -> str:
|
|
2353
|
+
git_folder = os.path.join(repository_folder, ".git")
|
|
2354
|
+
if os.path.isfile(git_folder):
|
|
2355
|
+
with open(git_folder, "r", encoding="utf-8") as f:
|
|
2356
|
+
line = f.readline().strip()
|
|
2357
|
+
prefix = "gitdir:"
|
|
2358
|
+
if not line.startswith(prefix):
|
|
2359
|
+
raise ValueError(f"Invalid .git file: '{git_folder}'")
|
|
2360
|
+
git_dir = line[len(prefix):].strip()
|
|
2361
|
+
if not os.path.isabs(git_dir):
|
|
2362
|
+
git_dir = os.path.normpath(os.path.join(repository_folder, git_dir))
|
|
2363
|
+
if not os.path.isdir(git_dir):
|
|
2364
|
+
raise ValueError(f"Resolved git directory '{git_dir}' does not exist.")
|
|
2365
|
+
return git_dir
|
|
2366
|
+
elif os.path.isdir(git_folder):
|
|
2367
|
+
return git_folder
|
|
2368
|
+
else:
|
|
2369
|
+
raise ValueError(f"Folder '{repository_folder}' is not a git-repository (no .git-folder found).")
|
|
2370
|
+
|
|
2336
2371
|
@staticmethod
|
|
2337
2372
|
@GeneralUtilities.check_arguments
|
|
2338
2373
|
def is_patch_version(version_string: str) -> bool:
|
|
@@ -2340,6 +2375,9 @@ class ScriptCollectionCore:
|
|
|
2340
2375
|
|
|
2341
2376
|
@GeneralUtilities.check_arguments
|
|
2342
2377
|
def get_version_from_gitversion(self, folder: str, variable: str) -> str:
|
|
2378
|
+
git_folder:str=self.get_real_git_folder(folder)
|
|
2379
|
+
cache_folder:str=os.path.join(git_folder,"gitversion_cache")
|
|
2380
|
+
GeneralUtilities.ensure_directory_does_not_exist(cache_folder)
|
|
2343
2381
|
# /nofetch and /nonormalize: avoid network calls / branch normalization (no auth, no DNS, deterministic in containers and offline).
|
|
2344
2382
|
# called twice as workaround for issue 1877 in gitversion ( https://github.com/GitTools/GitVersion/issues/1877 )
|
|
2345
2383
|
result = self.run_program_argsasarray("gitversion", ["/nofetch", "/nonormalize", "/showVariable", variable], folder)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import re
|
|
3
|
+
import sys
|
|
3
4
|
import json
|
|
5
|
+
import platform
|
|
4
6
|
from pathlib import Path
|
|
5
7
|
import xml.etree.ElementTree as ET
|
|
6
8
|
from lxml import etree
|
|
@@ -49,10 +51,74 @@ class TFCPS_CodeUnitSpecific_NodeJS_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
49
51
|
def do_common_tasks(self,current_codeunit_version:str)-> None:
|
|
50
52
|
codeunit_version = current_codeunit_version
|
|
51
53
|
codeunit_folder = self.get_codeunit_folder()
|
|
54
|
+
self.__remove_foreign_platform_node_modules_packages(codeunit_folder)
|
|
52
55
|
self.do_common_tasks_base(current_codeunit_version)
|
|
53
56
|
self.tfcps_Tools_General.replace_version_in_packagejson_file(GeneralUtilities.resolve_relative_path("./package.json", codeunit_folder), codeunit_version)
|
|
54
57
|
self.tfcps_Tools_General.do_npm_install(codeunit_folder, True,self.use_cache())
|
|
55
58
|
|
|
59
|
+
@GeneralUtilities.check_arguments
|
|
60
|
+
def __remove_foreign_platform_node_modules_packages(self, codeunit_folder: str) -> None:
|
|
61
|
+
# Native packages (esbuild, rollup, lightningcss, swc, ...) ship platform-specific binaries via
|
|
62
|
+
# optional dependencies whose package.json declares 'os'/'cpu'. When node_modules is shared between
|
|
63
|
+
# build-hosts (e.g. Windows-native vs. a mounted Linux-Docker-container) the binary for the foreign
|
|
64
|
+
# platform stays present and breaks the build. Remove every installed package whose declared 'os'/'cpu'
|
|
65
|
+
# does not match the current host so the subsequent npm-install fetches the matching one.
|
|
66
|
+
node_modules_folder = os.path.join(codeunit_folder, "node_modules")
|
|
67
|
+
if not os.path.isdir(node_modules_folder):
|
|
68
|
+
return
|
|
69
|
+
current_os = sys.platform # matches npm's 'os'-values ('win32', 'linux', 'darwin')
|
|
70
|
+
current_cpu = {
|
|
71
|
+
"amd64": "x64", "x86_64": "x64",
|
|
72
|
+
"aarch64": "arm64", "arm64": "arm64",
|
|
73
|
+
"i386": "ia32", "i686": "ia32", "x86": "ia32",
|
|
74
|
+
}.get(platform.machine().lower(), platform.machine().lower())
|
|
75
|
+
for package_folder in self.__get_node_modules_package_folders(node_modules_folder):
|
|
76
|
+
package_json_file = os.path.join(package_folder, "package.json")
|
|
77
|
+
if not os.path.isfile(package_json_file):
|
|
78
|
+
continue
|
|
79
|
+
try:
|
|
80
|
+
with open(package_json_file, encoding="utf-8") as f:
|
|
81
|
+
package_json = json.load(f)
|
|
82
|
+
except (ValueError, OSError):
|
|
83
|
+
continue
|
|
84
|
+
os_allowed = self.__node_platform_value_allowed(package_json.get("os"), current_os)
|
|
85
|
+
cpu_allowed = self.__node_platform_value_allowed(package_json.get("cpu"), current_cpu)
|
|
86
|
+
if not (os_allowed and cpu_allowed):
|
|
87
|
+
self._protected_sc.log.log(f"Remove foreign-platform node_modules-package '{os.path.basename(package_folder)}' (os={package_json.get('os')}, cpu={package_json.get('cpu')}; host={current_os}/{current_cpu}).", LogLevel.Debug)
|
|
88
|
+
GeneralUtilities.ensure_directory_does_not_exist(package_folder)
|
|
89
|
+
|
|
90
|
+
@GeneralUtilities.check_arguments
|
|
91
|
+
def __get_node_modules_package_folders(self, node_modules_folder: str) -> list[str]:
|
|
92
|
+
# Yields the package-folders inside node_modules. Packages live either directly in node_modules
|
|
93
|
+
# or, for scoped packages, one level below a '@scope'-folder.
|
|
94
|
+
result: list[str] = []
|
|
95
|
+
for entry in os.listdir(node_modules_folder):
|
|
96
|
+
entry_path = os.path.join(node_modules_folder, entry)
|
|
97
|
+
if not os.path.isdir(entry_path):
|
|
98
|
+
continue
|
|
99
|
+
if entry.startswith("@"):
|
|
100
|
+
for scoped_entry in os.listdir(entry_path):
|
|
101
|
+
scoped_path = os.path.join(entry_path, scoped_entry)
|
|
102
|
+
if os.path.isdir(scoped_path):
|
|
103
|
+
result.append(scoped_path)
|
|
104
|
+
else:
|
|
105
|
+
result.append(entry_path)
|
|
106
|
+
return result
|
|
107
|
+
|
|
108
|
+
@GeneralUtilities.check_arguments
|
|
109
|
+
def __node_platform_value_allowed(self, values, current: str) -> bool:
|
|
110
|
+
# Implements npm's 'os'/'cpu'-matching: a missing constraint allows everything; a negated entry
|
|
111
|
+
# ('!win32') blocks the value; if positive entries exist the current value must be one of them.
|
|
112
|
+
if not values:
|
|
113
|
+
return True
|
|
114
|
+
positives = [v for v in values if not v.startswith("!")]
|
|
115
|
+
negatives = [v[1:] for v in values if v.startswith("!")]
|
|
116
|
+
if current in negatives:
|
|
117
|
+
return False
|
|
118
|
+
if positives and current not in positives:
|
|
119
|
+
return False
|
|
120
|
+
return True
|
|
121
|
+
|
|
56
122
|
@GeneralUtilities.check_arguments
|
|
57
123
|
def generate_reference(self) -> None:
|
|
58
124
|
self.generate_reference_using_docfx()
|
|
@@ -49,12 +49,12 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
49
49
|
except Exception as exception:
|
|
50
50
|
self.sc.log.log_exception(f"'{product_information_file}' could not be validated against the XSD:", exception, LogLevel.Warning)
|
|
51
51
|
|
|
52
|
+
#run prepare-script
|
|
53
|
+
self.run_prepare_script()
|
|
54
|
+
|
|
52
55
|
#check if changelog exists
|
|
53
56
|
changelog_file=os.path.join(self.repository,"Other","Resources","Changelog",f"v{self.tfcps_tools_general.get_version_of_project(self.repository)}.md")
|
|
54
57
|
GeneralUtilities.assert_file_exists(changelog_file,f"Changelogfile \"{changelog_file}\" does not exist. Try to create it for example using \"sccreatechangelogentry -m ...\".")
|
|
55
|
-
|
|
56
|
-
#run prepare-script
|
|
57
|
-
self.run_prepare_script()
|
|
58
58
|
|
|
59
59
|
#mark current version as supported
|
|
60
60
|
now = GeneralUtilities.get_now()
|
|
@@ -121,12 +121,12 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
121
121
|
self.sc.run_program_argsasarray(GeneralUtilities.get_python_executable(),["PrepareBuildCodeunits.py"]+args, os.path.join(self.repository,"Other","Scripts"),print_live_output=True)
|
|
122
122
|
|
|
123
123
|
@GeneralUtilities.check_arguments
|
|
124
|
-
def build_codeunits_in_container(self) ->
|
|
124
|
+
def build_codeunits_in_container(self) -> tuple[bool, str]:
|
|
125
125
|
container_repository_folder = "/Workspace/Repository"
|
|
126
126
|
image = self.tfcps_tools_general.oci_image_manager.get_registry_address_for_image_with_default_tag(self.repository, "SCBuilder")
|
|
127
127
|
|
|
128
|
-
#build the scbuildcodeunits-arguments based on the current state (analogous to the arguments accepted by the scbuildcodeunits-executable)
|
|
129
|
-
scbuildcodeunits_arguments = ["-r", container_repository_folder, "-v",
|
|
128
|
+
#build the scbuildcodeunits-arguments based on the current state (analogous to the arguments accepted by the scbuildcodeunits-executable). each token must be a separate argument because run_program_argsasarray passes every list-element verbatim and does not split on spaces.
|
|
129
|
+
scbuildcodeunits_arguments = ["scbuildcodeunits", "-r", container_repository_folder, "-v", "4"]
|
|
130
130
|
if not self.__use_cache:
|
|
131
131
|
scbuildcodeunits_arguments.append("-c")
|
|
132
132
|
if self.__is_pre_merge:
|
|
@@ -134,7 +134,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
134
134
|
if self.__assert_no_new_changes:
|
|
135
135
|
scbuildcodeunits_arguments.append("-u")
|
|
136
136
|
if GeneralUtilities.string_has_content(self.additionalargumentsfile):
|
|
137
|
-
scbuildcodeunits_arguments
|
|
137
|
+
scbuildcodeunits_arguments += ["-a", self.__translate_path_into_container(self.additionalargumentsfile, container_repository_folder)]
|
|
138
138
|
|
|
139
139
|
#run scbuildcodeunits inside the SCBuilder-image. the repository is mounted into the container and the docker-socket is forwarded because codeunit-builds often start containers (for example local test-services).
|
|
140
140
|
docker_arguments = [
|
|
@@ -143,11 +143,15 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
143
143
|
"-v", "/var/run/docker.sock:/var/run/docker.sock",
|
|
144
144
|
"-w", container_repository_folder,
|
|
145
145
|
image,
|
|
146
|
-
"scbuildcodeunits",
|
|
147
146
|
] + scbuildcodeunits_arguments
|
|
148
147
|
self.sc.log.log(f"Build codeunits in container using image \"{image}\"...")
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
# the exitcode is evaluated by the caller (returned as part of the result-tuple), so the program-runner must not raise on a non-zero exitcode here.
|
|
149
|
+
result=self.sc.run_program_argsasarray("docker", docker_arguments, throw_exception_if_exitcode_is_not_zero=False, print_live_output=True)
|
|
150
|
+
exit_code:int=result[0]
|
|
151
|
+
stdout:str=result[1] or GeneralUtilities.empty_string
|
|
152
|
+
stderr:str=result[2] or GeneralUtilities.empty_string
|
|
153
|
+
return (exit_code==0,f"{stdout}\n{stderr}")
|
|
154
|
+
|
|
151
155
|
@GeneralUtilities.check_arguments
|
|
152
156
|
def __translate_path_into_container(self, host_path: str, container_repository_folder: str) -> str:
|
|
153
157
|
normalized_repository = os.path.normpath(self.repository)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.5
|
|
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
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
ScriptCollection/AnionBuildPlatform.py,sha256=T1tkh4pzQyUb8r5acWiv95TvmkNnDhiNaQAP2dJJvoA,12057
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
|
|
3
|
-
ScriptCollection/Executables.py,sha256=
|
|
4
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
3
|
+
ScriptCollection/Executables.py,sha256=lw8K8TaU406TryWv8-upAaTi7v3ATmlszsbBBMshvSY,66408
|
|
4
|
+
ScriptCollection/GeneralUtilities.py,sha256=Qox4wQ2oWTahwXexC4qSUzXua5qr9PzRRrmOcJoM_IA,70500
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=yYaC95h40uszuZPggn2kK3qXIN2ZjGMCavo-NQ53ElQ,1537
|
|
7
7
|
ScriptCollection/ProgramRunnerBase.py,sha256=eZenpiIFW1dhvSVCG7cfBs5hO4_KLlOxR7oXoSxUDmk,2286
|
|
8
8
|
ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrRjAPIwT5Y,37
|
|
9
|
-
ScriptCollection/ProgramRunnerPopen.py,sha256=
|
|
9
|
+
ScriptCollection/ProgramRunnerPopen.py,sha256=zVD-gZY85o8wiGFcpYAGNDl-tXaKzipl1Bkhqy2ois4,4681
|
|
10
10
|
ScriptCollection/ProgramRunnerSudo.py,sha256=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=Z-HhC_CRtU3HdQflNsabFh9IJOucHcXmxMDcf58fli0,4671
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=qHl4QyeH12YDXfoHkQrNCIVeUNdcK8OIkbEUuYf8JT4,226411
|
|
13
13
|
ScriptCollection/UnassignedVariablesCheck.py,sha256=v59qLQ5RRvx31ouuCW7NWZj3McWENvGBPkV5ZGBmqJE,4344
|
|
14
14
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=o129UYDtLymCRjMZBP9Puaj19ueMHoNt6UTLspfnaRc,1758
|
|
@@ -35,7 +35,7 @@ ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html,sha256=CX9S1bdOz
|
|
|
35
35
|
ScriptCollection/TFCPS/SCTaskRunnerServer.py,sha256=rpuwSsQ6YQfZS2LGnvOH5ql8zs_-cHU4LQttS7XNT60,11272
|
|
36
36
|
ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=oICRtl85n2puWvchcJIkmLZL1BAylMbzH7ltBGWfqgY,31973
|
|
37
37
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=ulxU6CykkqyE6QWeX8PEyW0rntuK3qfBEbPSIplekfI,9677
|
|
38
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
38
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=T5xW98EslPov-DBwd3R0tO8PhrA-ZsQUaHh2vVOJSlg,24197
|
|
39
39
|
ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=X2NgZgbOkJsdZ6wMHB_RuS_rQCuz5oQCqzYrxyXBN9Q,6680
|
|
40
40
|
ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=5vCFfDiU8bvfcnoKNs2ATS8nsl6mYXcIuX7XfYE0tvg,2116
|
|
41
41
|
ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=BsSV4a-NZY86MZ20d-_rYxNVAI4UzAfmEwXlRZ8qWQc,7685
|
|
@@ -57,14 +57,14 @@ ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=kyx26AnT1-LySFA46w
|
|
|
57
57
|
ScriptCollection/TFCPS/Go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
58
|
ScriptCollection/TFCPS/Maven/TFCPS_CodeUnitSpecific_Maven.py,sha256=WcWWtCV3GkAk53RIN_6rjXNvkKZ5i5hBEMCmPQo6j30,1685
|
|
59
59
|
ScriptCollection/TFCPS/Maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
-
ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=
|
|
60
|
+
ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=TBYMO1U5wbbSy35VFn4fOh0IwZMLQwsMsP5LAWqGq1E,18175
|
|
61
61
|
ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=Bd1gxCk9Fb6JO4XFk-sUWdn4bOvMJp1xpvN6wTKMh0Y,15890
|
|
63
63
|
ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
64
|
ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
|
|
65
65
|
ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
66
|
-
scriptcollection-4.3.
|
|
67
|
-
scriptcollection-4.3.
|
|
68
|
-
scriptcollection-4.3.
|
|
69
|
-
scriptcollection-4.3.
|
|
70
|
-
scriptcollection-4.3.
|
|
66
|
+
scriptcollection-4.3.5.dist-info/METADATA,sha256=KktRtVQzCt2PuIANhKrubI0KB3dLA4QZ579AyDf0ouQ,7815
|
|
67
|
+
scriptcollection-4.3.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
68
|
+
scriptcollection-4.3.5.dist-info/entry_points.txt,sha256=MwiP9P29EeSfjS19JOZmqbx8OzpZrUWpgMza3EffBs8,5812
|
|
69
|
+
scriptcollection-4.3.5.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
70
|
+
scriptcollection-4.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|