ScriptCollection 4.4.13__py3-none-any.whl → 4.4.15__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 +6 -4
- ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py +24 -4
- ScriptCollection/TFCPS/TFCPS_RemoteBuild.py +5 -0
- {scriptcollection-4.4.13.dist-info → scriptcollection-4.4.15.dist-info}/METADATA +1 -1
- {scriptcollection-4.4.13.dist-info → scriptcollection-4.4.15.dist-info}/RECORD +8 -8
- {scriptcollection-4.4.13.dist-info → scriptcollection-4.4.15.dist-info}/WHEEL +0 -0
- {scriptcollection-4.4.13.dist-info → scriptcollection-4.4.15.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.4.13.dist-info → scriptcollection-4.4.15.dist-info}/top_level.txt +0 -0
|
@@ -39,7 +39,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
39
39
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
40
40
|
from .SCLog import SCLog, LogLevel
|
|
41
41
|
|
|
42
|
-
version = "4.4.
|
|
42
|
+
version = "4.4.15"
|
|
43
43
|
__version__ = version
|
|
44
44
|
|
|
45
45
|
class VSCodeWorkspaceShellTask:
|
|
@@ -4441,9 +4441,11 @@ OCR-content:
|
|
|
4441
4441
|
GeneralUtilities.assert_condition(self.is_running_in_build_container(), "This function should only be run in the build container.")
|
|
4442
4442
|
|
|
4443
4443
|
expected_image = self.__get_scbuilder_image_from_image_definition_file(repository_folder)
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4444
|
+
GeneralUtilities.assert_condition("scbuilder:" in expected_image, f"The SCBuilder-image '{expected_image}' defined in the image-definition-file of the repository is not a valid SCBuilder-image. It must contain 'scbuilder:'.")
|
|
4445
|
+
if not expected_image.endswith(":latest"):
|
|
4446
|
+
minimal_required_scbuilder_version = Version("1.2.9")#the preparation-steps below require at least this SCBuilder-version
|
|
4447
|
+
defined_scbuilder_version = self.__get_version_of_scbuilder_image(expected_image)#TODO remove this check after 2026-12-31
|
|
4448
|
+
GeneralUtilities.assert_condition(defined_scbuilder_version >= minimal_required_scbuilder_version, f"The SCBuilder-version {defined_scbuilder_version} defined in the image-definition-file of the repository is older than the minimal required version {minimal_required_scbuilder_version}. Please update the SCBuilder-image.")
|
|
4447
4449
|
|
|
4448
4450
|
self.run_program("update-ca-certificates")
|
|
4449
4451
|
self.run_program_argsasarray("sh",["-c","docker buildx create --name ci-builder --driver docker-container --use 2>/dev/null || docker buildx use ci-builder"])
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import platform
|
|
2
3
|
import shutil
|
|
3
4
|
import re
|
|
4
5
|
import zipfile
|
|
5
6
|
from ...GeneralUtilities import GeneralUtilities
|
|
6
7
|
from ...SCLog import LogLevel
|
|
7
8
|
from ..TFCPS_CodeUnitSpecific_Base import TFCPS_CodeUnitSpecific_Base,TFCPS_CodeUnitSpecific_Base_CLI
|
|
8
|
-
from ..TFCPS_RemoteBuild import RunnerOperatingSystem
|
|
9
|
+
from ..TFCPS_RemoteBuild import TFCPS_RemoteBuild, RunnerOperatingSystem
|
|
9
10
|
|
|
10
11
|
class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
11
12
|
|
|
@@ -40,9 +41,17 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
40
41
|
GeneralUtilities.ensure_directory_exists(web_folder)
|
|
41
42
|
GeneralUtilities.copy_content_of_folder(web_relase_folder, web_folder)
|
|
42
43
|
elif target == "windows":
|
|
43
|
-
# Windows-builds
|
|
44
|
-
#
|
|
45
|
-
|
|
44
|
+
# Windows-builds prefer a Windows-task-runner - even when building on a Windows-client - so that all builds
|
|
45
|
+
# are produced uniformly in the same defined environment. See the remote-build-article in the reference. If
|
|
46
|
+
# no runner is configured, fall back to building locally (only possible when already running on Windows)
|
|
47
|
+
# instead of failing, so a development machine without a configured runner is not blocked.
|
|
48
|
+
if platform.system() == "Windows" and not TFCPS_RemoteBuild(self._protected_sc).has_any_runner_configured():
|
|
49
|
+
self._protected_sc.log.log("No remote-build-runner is configured; building the windows-target locally "
|
|
50
|
+
"instead. This build is not guaranteed to be produced in the same uniform "
|
|
51
|
+
"environment as a runner-built one.", LogLevel.Warning)
|
|
52
|
+
self._protected_sc.run_with_epew("flutter", "build windows", src_folder)
|
|
53
|
+
else:
|
|
54
|
+
self.run_program_on_remote_runner(RunnerOperatingSystem.Windows, "flutter", ["build", "windows"], src_folder)
|
|
46
55
|
windows_release_folder = os.path.join(src_folder, "build/windows/x64/runner/Release")
|
|
47
56
|
windows_folder = os.path.join(artifacts_folder, "BuildResult_Windows")
|
|
48
57
|
GeneralUtilities.ensure_directory_does_not_exist(windows_folder)
|
|
@@ -82,6 +91,17 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
82
91
|
else:
|
|
83
92
|
raise ValueError(f"Not supported target: {target}")
|
|
84
93
|
self.copy_source_files_to_output_directory()
|
|
94
|
+
if len(targets) == 0:
|
|
95
|
+
# A pure Dart/Flutter library codeunit (no platform target) has no compiled artifact of its own, but
|
|
96
|
+
# TFCPS_CodeUnit_BuildCodeUnit.build_codeunit() requires a 'BuildResult_.+'-matching artifact for every
|
|
97
|
+
# codeunit. Publish a copy of the SourceCode-artifact under a BuildResult_-name to satisfy that generic
|
|
98
|
+
# check instead of weakening it for every codeunit type. The SourceCode-artifact folder itself keeps its
|
|
99
|
+
# name unchanged because the DependentCodeUnits-convention (see the reference) already relies on it.
|
|
100
|
+
source_code_folder = os.path.join(artifacts_folder, "SourceCode")
|
|
101
|
+
build_result_source_code_folder = os.path.join(artifacts_folder, "BuildResult_SourceCode")
|
|
102
|
+
GeneralUtilities.ensure_directory_does_not_exist(build_result_source_code_folder)
|
|
103
|
+
GeneralUtilities.ensure_directory_exists(build_result_source_code_folder)
|
|
104
|
+
GeneralUtilities.copy_content_of_folder(source_code_folder, build_result_source_code_folder)
|
|
85
105
|
|
|
86
106
|
@GeneralUtilities.check_arguments
|
|
87
107
|
def linting(self) -> None:
|
|
@@ -44,6 +44,11 @@ class TFCPS_RemoteBuild:
|
|
|
44
44
|
def __init__(self, sc: ScriptCollectionCore):
|
|
45
45
|
self.__sc = sc
|
|
46
46
|
|
|
47
|
+
@GeneralUtilities.check_arguments
|
|
48
|
+
def has_any_runner_configured(self) -> bool:
|
|
49
|
+
"""Whether at least one remote-build-runner is configured (see run_program_on_runner)."""
|
|
50
|
+
return len(self.__load_runner_endpoints()) > 0
|
|
51
|
+
|
|
47
52
|
@GeneralUtilities.check_arguments
|
|
48
53
|
def run_program_on_runner(self, required_os: RunnerOperatingSystem, repository_folder: str, codeunit_name: str, program: str, arguments: list[str], working_directory: str, poll_interval_in_seconds: int = 3, timeout_in_seconds: int = 60*60) -> None:
|
|
49
54
|
endpoints = self.__load_runner_endpoints()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: scriptcollection
|
|
3
|
-
Version: 4.4.
|
|
3
|
+
Version: 4.4.15
|
|
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=V5GdknY0ZreGpXQXebFrhjLkvw3ZHSalc1EALXfYy90,262108
|
|
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
|
|
@@ -46,7 +46,7 @@ ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=Krt5oyGNcRAN3szsgU7LoTh8yVTOd
|
|
|
46
46
|
ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=oYEhz5ZWMnbu97_CcYEqdDxakUFVppyOVQiJzADq59c,22434
|
|
47
47
|
ScriptCollection/TFCPS/TFCPS_OCIImageSecretScan.py,sha256=rhw0glr4gZ5enG9faOD51xE4MMK1cIdNjUdaswiMsrY,14622
|
|
48
48
|
ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=XLVsFTA1jvfDbZ7wYJgIdEByZhF_bYVbA5jkisuvK4k,2322
|
|
49
|
-
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=
|
|
49
|
+
ScriptCollection/TFCPS/TFCPS_RemoteBuild.py,sha256=JY2mafxObDXVxbALgex5hIFMN0Pd7AZae1OP_6rS5M8,12108
|
|
50
50
|
ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=XC2KXHiF5gNptyinqyWaK2DeP0li-hD4f-yEB2sktVQ,164339
|
|
51
51
|
ScriptCollection/TFCPS/TFCPS_VisualRegressionTests.py,sha256=6_63udxHnPlu_TMk_ftLZTnzriJO8MCxVCVAsweZqHs,37073
|
|
52
52
|
ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -57,7 +57,7 @@ ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=
|
|
|
57
57
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
|
58
58
|
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=GCFzDNAnmm40EeqOYgD_EeuEwDY58ujwJ1-Zn_naamc,61797
|
|
59
59
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
-
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=
|
|
60
|
+
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=6AOKEMR1s6d1BIAxUC-E2lolzwKXqKBSYMQnCVqPAcs,11460
|
|
61
61
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=m4Pax-U6o5XuspLnLfnWjyQMtoC7zBDDNJW9EhLWjeE,9012
|
|
63
63
|
ScriptCollection/TFCPS/Go/__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.15.dist-info/METADATA,sha256=zuzoHqFgOfqFUs67moGeLxjiT7hQpIHQsMik1a5_AHY,7816
|
|
75
|
+
scriptcollection-4.4.15.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
76
|
+
scriptcollection-4.4.15.dist-info/entry_points.txt,sha256=GNma7tN0J59EvK71su-G1w22RnZ05bXcPrELyLx3AL0,6151
|
|
77
|
+
scriptcollection-4.4.15.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
78
|
+
scriptcollection-4.4.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|