ScriptCollection 4.3.45__py3-none-any.whl → 4.3.47__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 +15 -22
- ScriptCollection/Resources/CultureChooser/CultureChooser.js +0 -0
- ScriptCollection/Resources/CultureChooser/index.html +0 -0
- ScriptCollection/Resources/Dependencies/JRE/Version.txt +0 -0
- ScriptCollection/Resources/Dependencies/OpenAPIGenerator/Version.txt +0 -0
- ScriptCollection/Resources/Fonts/DejaVuSans-Bold.ttf +0 -0
- ScriptCollection/Resources/Fonts/DejaVuSans-BoldOblique.ttf +0 -0
- ScriptCollection/Resources/Fonts/DejaVuSans-Oblique.ttf +0 -0
- ScriptCollection/Resources/Fonts/DejaVuSans.ttf +0 -0
- ScriptCollection/Resources/Fonts/LICENSE.txt +0 -0
- ScriptCollection/Resources/MaintenanceSite/MaintenanceSite.html +0 -0
- ScriptCollection/ScriptCollectionCore.py +85 -1
- ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py +2 -4
- ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py +3 -1
- ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py +1 -10
- ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py +35 -12
- {scriptcollection-4.3.45.dist-info → scriptcollection-4.3.47.dist-info}/METADATA +168 -168
- {scriptcollection-4.3.45.dist-info → scriptcollection-4.3.47.dist-info}/RECORD +11 -11
- {scriptcollection-4.3.45.dist-info → scriptcollection-4.3.47.dist-info}/WHEEL +0 -0
- {scriptcollection-4.3.45.dist-info → scriptcollection-4.3.47.dist-info}/entry_points.txt +0 -0
- {scriptcollection-4.3.45.dist-info → scriptcollection-4.3.47.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
|
@@ -253,22 +253,22 @@ def BuildCodeUnits() -> int:
|
|
|
253
253
|
parser.add_argument('-v', '--verbosity', required=False, default=3, help=f"Sets the loglevel. Possible values: {verbosity_values}")
|
|
254
254
|
parser.add_argument('-e','--targetenvironment', required=False, default="QualityCheck")
|
|
255
255
|
parser.add_argument('-a','--additionalargumentsfile', required=False, default=None)
|
|
256
|
-
parser.add_argument("-
|
|
256
|
+
parser.add_argument("-n",'--nocache', required=False, default=False, action='store_true')
|
|
257
257
|
parser.add_argument('-p','--ispremerge', required=False, default=False, action='store_true')
|
|
258
258
|
parser.add_argument('-u','--assertnonewchanges', required=False, default=False, action='store_true')
|
|
259
259
|
parser.add_argument('-m','--addreadytomergeflag', required=False, default=False, action='store_true')
|
|
260
|
-
|
|
260
|
+
parser.add_argument('-c','--runincontainer', required=False, default=False, action='store_true')
|
|
261
261
|
args = parser.parse_args()
|
|
262
262
|
|
|
263
263
|
verbosity=LogLevel(int(args.verbosity))
|
|
264
|
-
|
|
265
264
|
repo:str=GeneralUtilities.resolve_relative_path(args.repositoryfolder,os.getcwd())
|
|
266
|
-
|
|
267
265
|
t:TFCPS_CodeUnit_BuildCodeUnits=TFCPS_CodeUnit_BuildCodeUnits(repo,verbosity,args.targetenvironment,args.additionalargumentsfile,not args.nocache,args.ispremerge,args.assertnonewchanges,args.addreadytomergeflag)
|
|
268
|
-
|
|
266
|
+
if args.runincontainer:
|
|
267
|
+
t.build_codeunits_in_container(repo)
|
|
268
|
+
else:
|
|
269
|
+
t.build_codeunits()
|
|
269
270
|
return 0
|
|
270
271
|
|
|
271
|
-
|
|
272
272
|
def BuildCodeUnitsC() -> int:
|
|
273
273
|
parser = argparse.ArgumentParser()
|
|
274
274
|
parser.add_argument('-r','--repositoryfolder', required=False, default=".")
|
|
@@ -283,6 +283,7 @@ def BuildCodeUnitsC() -> int:
|
|
|
283
283
|
parser.add_argument('-u','--assertnonewchanges', required=False, default=False, action='store_true')
|
|
284
284
|
parser.add_argument('-m','--addreadytomergeflag', required=False, default=False, action='store_true')
|
|
285
285
|
args = parser.parse_args()
|
|
286
|
+
|
|
286
287
|
GeneralUtilities.reconfigure_standard_input_and_outputs()
|
|
287
288
|
repo:str=GeneralUtilities.resolve_relative_path(args.repositoryfolder,os.getcwd())
|
|
288
289
|
verbosity=LogLevel(int(args.verbosity))
|
|
@@ -302,6 +303,7 @@ def UpdateDependencies() -> int:
|
|
|
302
303
|
parser.add_argument('--additionalargumentsfile', required=False, default=None)
|
|
303
304
|
parser.add_argument("-c",'--nocache', required=False, default=False, action='store_true')
|
|
304
305
|
args = parser.parse_args()
|
|
306
|
+
|
|
305
307
|
verbosity=LogLevel(int(args.verbosity))
|
|
306
308
|
repo:str=GeneralUtilities.resolve_relative_path(args.repositoryfolder,os.getcwd())
|
|
307
309
|
t:TFCPS_CodeUnit_BuildCodeUnits=TFCPS_CodeUnit_BuildCodeUnits(repo,verbosity,args.targetenvironment,args.additionalargumentsfile,not args.nocache,False,False)
|
|
@@ -320,6 +322,7 @@ def GenerateCertificateAuthority() -> int:
|
|
|
320
322
|
parser.add_argument('--days_until_expire', required=False, default=None, type=int)
|
|
321
323
|
parser.add_argument('--password', required=False, default=None)
|
|
322
324
|
args = parser.parse_args()
|
|
325
|
+
|
|
323
326
|
ScriptCollectionCore().generate_certificate_authority(os.getcwd(), args.name, args.subj_c, args.subj_st, args.subj_l, args.subj_o, args.subj_ou, args.days_until_expire, args.password)
|
|
324
327
|
return 0
|
|
325
328
|
|
|
@@ -1167,26 +1170,14 @@ def SearchForSecrets() -> int:
|
|
|
1167
1170
|
t.search_for_secrets()
|
|
1168
1171
|
return 0
|
|
1169
1172
|
|
|
1170
|
-
|
|
1171
|
-
def __prepare_build_pipeline(verbosity: int) -> None:
|
|
1172
|
-
# Common preparation for the build-pipeline. The actual buildx-build (see TFCPS_CodeUnitSpecific_Docker.build)
|
|
1173
|
-
# exports the image via "--output type=docker,dest=...tar". The default "docker"-driver can not do that unless
|
|
1174
|
-
# the containerd-image-store is enabled on the daemon, so a "docker-container"-builder is created and selected
|
|
1175
|
-
# here. This is required for GitLab and GitHub (and any other CI) alike, so both entry-points share this logic.
|
|
1176
|
-
sc: ScriptCollectionCore = ScriptCollectionCore()
|
|
1177
|
-
sc.log.loglevel = LogLevel(verbosity)
|
|
1178
|
-
GeneralUtilities.assert_condition(sc.is_running_in_build_container(), "This function should only be run in the build container.")
|
|
1179
|
-
sc.run_program("update-ca-certificates")
|
|
1180
|
-
sc.run_program_argsasarray("sh",["-c","docker buildx create --name ci-builder --driver docker-container --use 2>/dev/null || docker buildx use ci-builder"])
|
|
1181
|
-
sc.run_program("docker","buildx inspect --bootstrap")
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
1173
|
def PrepareBuildPipelineForGitlab() -> int:
|
|
1185
1174
|
parser = argparse.ArgumentParser(description="Prepares the build-pipeline-configuration for GitLab.")
|
|
1186
1175
|
verbosity_values = ", ".join(f"{lvl.value}={lvl.name}" for lvl in LogLevel)
|
|
1187
1176
|
parser.add_argument('-v', '--verbosity', required=False, default=3, help=f"Sets the loglevel. Possible values: {verbosity_values}")
|
|
1188
1177
|
args = parser.parse_args()
|
|
1189
|
-
|
|
1178
|
+
sc=ScriptCollectionCore()
|
|
1179
|
+
sc.log.loglevel=LogLevel(int(args.verbosity))
|
|
1180
|
+
sc.prepare_build_pipeline_for_gitlab()
|
|
1190
1181
|
return 0
|
|
1191
1182
|
|
|
1192
1183
|
|
|
@@ -1195,7 +1186,9 @@ def PrepareBuildPipelineForGithub() -> int:
|
|
|
1195
1186
|
verbosity_values = ", ".join(f"{lvl.value}={lvl.name}" for lvl in LogLevel)
|
|
1196
1187
|
parser.add_argument('-v', '--verbosity', required=False, default=3, help=f"Sets the loglevel. Possible values: {verbosity_values}")
|
|
1197
1188
|
args = parser.parse_args()
|
|
1198
|
-
|
|
1189
|
+
sc=ScriptCollectionCore()
|
|
1190
|
+
sc.log.loglevel=LogLevel(int(args.verbosity))
|
|
1191
|
+
sc.prepare_build_pipeline_for_github()
|
|
1199
1192
|
return 0
|
|
1200
1193
|
|
|
1201
1194
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -33,12 +33,13 @@ import qrcode
|
|
|
33
33
|
import pycdlib
|
|
34
34
|
import send2trash
|
|
35
35
|
from pypdf import PdfReader, PdfWriter
|
|
36
|
+
from packaging.version import Version
|
|
36
37
|
from .GeneralUtilities import GeneralUtilities,Platform
|
|
37
38
|
from .ProgramRunnerBase import ProgramRunnerBase
|
|
38
39
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
39
40
|
from .SCLog import SCLog, LogLevel
|
|
40
41
|
|
|
41
|
-
version = "4.3.
|
|
42
|
+
version = "4.3.47"
|
|
42
43
|
__version__ = version
|
|
43
44
|
|
|
44
45
|
class VSCodeWorkspaceShellTask:
|
|
@@ -2547,6 +2548,17 @@ class ScriptCollectionCore:
|
|
|
2547
2548
|
lines = ["/Cache/"]
|
|
2548
2549
|
GeneralUtilities.write_lines_to_file(gitignore_file, lines)
|
|
2549
2550
|
|
|
2551
|
+
@GeneralUtilities.check_arguments
|
|
2552
|
+
def ensure_line_is_in_gitignore(self, repository_folder: str, line: str) -> None:
|
|
2553
|
+
"""Ensures that "<repository>/.gitignore" exists and contains the given line. The line is appended if it is not contained yet."""
|
|
2554
|
+
gitignore_file = os.path.join(repository_folder, ".gitignore")
|
|
2555
|
+
if os.path.isfile(gitignore_file):
|
|
2556
|
+
existing_lines = GeneralUtilities.read_lines_from_file(gitignore_file)
|
|
2557
|
+
else:
|
|
2558
|
+
existing_lines = []
|
|
2559
|
+
if line not in existing_lines:
|
|
2560
|
+
GeneralUtilities.write_lines_to_file(gitignore_file, existing_lines+[line])
|
|
2561
|
+
|
|
2550
2562
|
@GeneralUtilities.check_arguments
|
|
2551
2563
|
def check_python_ast(self, path: str) -> list[tuple[str, int, int, str]]:
|
|
2552
2564
|
"""
|
|
@@ -3078,6 +3090,14 @@ TXDX
|
|
|
3078
3090
|
if normalized_content != content:
|
|
3079
3091
|
GeneralUtilities.write_binary_to_file(file, normalized_content)
|
|
3080
3092
|
|
|
3093
|
+
@GeneralUtilities.check_arguments
|
|
3094
|
+
def normalize_line_endings_of_files_in_folder(self, folder: str, file_extensions: list[str]) -> None:
|
|
3095
|
+
"""Normalizes the line-endings of all not-git-ignored files inside 'folder' which have one of the given
|
|
3096
|
+
file-extensions. The file-extensions must be given without a leading dot (example: ["ts", "js"])."""
|
|
3097
|
+
for file_extension in file_extensions:
|
|
3098
|
+
for file in self.get_not_git_ignored_files_of_folder(folder, f".{file_extension}"):
|
|
3099
|
+
self.normalize_line_endings(file)
|
|
3100
|
+
|
|
3081
3101
|
@GeneralUtilities.check_arguments
|
|
3082
3102
|
def remove_trailing_linebreak(self, file: str) -> None:
|
|
3083
3103
|
content = GeneralUtilities.read_binary_from_file(file)
|
|
@@ -3418,6 +3438,21 @@ OCR-content:
|
|
|
3418
3438
|
arcname = os.path.relpath(file_path, start=folder)
|
|
3419
3439
|
zipf.write(file_path, arcname)
|
|
3420
3440
|
|
|
3441
|
+
@GeneralUtilities.check_arguments
|
|
3442
|
+
def create_zip_archive_of_folders(self, folders:dict[str,str],zip_file:str) -> None:
|
|
3443
|
+
"""Creates a zip-archive which contains the content of all given folders. The keys of 'folders' are the
|
|
3444
|
+
folder-names which are used inside the archive and the values are the paths of the folders which should be added."""
|
|
3445
|
+
GeneralUtilities.assert_file_does_not_exist(zip_file)
|
|
3446
|
+
with zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEFLATED) as zipf:
|
|
3447
|
+
for folder_name_in_archive, folder in folders.items():
|
|
3448
|
+
GeneralUtilities.assert_folder_exists(folder)
|
|
3449
|
+
folder = os.path.abspath(folder)
|
|
3450
|
+
for root, _, files in os.walk(folder):
|
|
3451
|
+
for file in files:
|
|
3452
|
+
file_path = os.path.join(root, file)
|
|
3453
|
+
arcname = os.path.join(folder_name_in_archive, os.path.relpath(file_path, start=folder))
|
|
3454
|
+
zipf.write(file_path, arcname)
|
|
3455
|
+
|
|
3421
3456
|
@GeneralUtilities.check_arguments
|
|
3422
3457
|
def start_local_test_service(self, file: str):
|
|
3423
3458
|
example_folder = os.path.dirname(file)
|
|
@@ -4163,3 +4198,52 @@ OCR-content:
|
|
|
4163
4198
|
def is_running_in_build_container(self) ->bool:
|
|
4164
4199
|
"""this function is based on a convention and does not do a real check."""
|
|
4165
4200
|
return os.environ.get("ISRUNNINGINBUILDCONTAINER") == "true"
|
|
4201
|
+
|
|
4202
|
+
def prepare_build_pipeline_for_gitlab(self):
|
|
4203
|
+
repository_folder:str=os.getcwd()
|
|
4204
|
+
self.__prepare_build_pipeline(repository_folder)
|
|
4205
|
+
|
|
4206
|
+
def prepare_build_pipeline_for_github(self):
|
|
4207
|
+
repository_folder:str=os.getcwd()
|
|
4208
|
+
self.assert_scbuilder_image_in_github_workflow_matches_image_definition(repository_folder)
|
|
4209
|
+
self.__prepare_build_pipeline(repository_folder)
|
|
4210
|
+
|
|
4211
|
+
def __prepare_build_pipeline(self,repository_folder:str) -> None:
|
|
4212
|
+
GeneralUtilities.assert_condition(self.is_running_in_build_container(), "This function should only be run in the build container.")
|
|
4213
|
+
|
|
4214
|
+
expected_image = self.__get_scbuilder_image_from_image_definition_file(repository_folder)
|
|
4215
|
+
minimal_required_scbuilder_version = Version("1.2.5")#the preparation-steps below require at least this SCBuilder-version
|
|
4216
|
+
defined_scbuilder_version = self.__get_version_of_scbuilder_image(expected_image)#TODO remove this check after 2026-12-31
|
|
4217
|
+
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.")
|
|
4218
|
+
|
|
4219
|
+
self.run_program("update-ca-certificates")
|
|
4220
|
+
self.run_program_argsasarray("sh",["-c","docker buildx create --name ci-builder --driver docker-container --use 2>/dev/null || docker buildx use ci-builder"])
|
|
4221
|
+
self.run_program("docker","buildx inspect --bootstrap")
|
|
4222
|
+
|
|
4223
|
+
@GeneralUtilities.check_arguments
|
|
4224
|
+
def assert_scbuilder_image_in_github_workflow_matches_image_definition(self, repository: str) -> None:
|
|
4225
|
+
"""Asserts that the SCBuilder-image used in the GitHub-buildpipeline is the same as the one defined in the image-definition-file of the repository."""
|
|
4226
|
+
workflow_file = os.path.join(repository, ".github", "workflows", "buildpipeline.yml")
|
|
4227
|
+
GeneralUtilities.assert_file_exists(workflow_file, f"The file '{workflow_file}' does not exist.")
|
|
4228
|
+
expected_image = self.__get_scbuilder_image_from_image_definition_file(repository)
|
|
4229
|
+
used_images = re.findall(r"^\s*image:\s*[\"']?(\S*scbuilder:\S+?)[\"']?\s*$", GeneralUtilities.read_text_from_file(workflow_file), re.IGNORECASE | re.MULTILINE)
|
|
4230
|
+
GeneralUtilities.assert_condition(1==len(used_images), f"No SCBuilder-image found in '{workflow_file}'.")
|
|
4231
|
+
used_image = used_images[0]
|
|
4232
|
+
GeneralUtilities.assert_condition(used_image == expected_image, f"The SCBuilder-image '{used_image}' used in '{workflow_file}' does not match the image '{expected_image}' defined in the image-definition-file of the repository.")
|
|
4233
|
+
|
|
4234
|
+
@GeneralUtilities.check_arguments
|
|
4235
|
+
def __get_version_of_scbuilder_image(self, image: str) -> Version:
|
|
4236
|
+
"""Returns the version of a SCBuilder-image-address including tag (example: "aniondev/scbuilder:v1.2.5" results in the version 1.2.5)."""
|
|
4237
|
+
version_match = re.search(r"\d+(\.\d+)+", image.split(":")[-1])
|
|
4238
|
+
GeneralUtilities.assert_condition(version_match is not None, f"The SCBuilder-image '{image}' does not contain a version-string.")
|
|
4239
|
+
return Version(version_match.group(0))
|
|
4240
|
+
|
|
4241
|
+
@GeneralUtilities.check_arguments
|
|
4242
|
+
def __get_scbuilder_image_from_image_definition_file(self, repository: str) -> str:
|
|
4243
|
+
"""Returns the SCBuilder-image (address including tag) as defined in the image-definition-file of the repository."""
|
|
4244
|
+
image_definition_file = os.path.join(repository, ".ScriptCollection", "OCIImages", "ImageDefinition.csv")
|
|
4245
|
+
GeneralUtilities.assert_file_exists(image_definition_file, f"The file '{image_definition_file}' does not exist.")
|
|
4246
|
+
for line in [line.split(";") for line in GeneralUtilities.read_nonempty_lines_from_file(image_definition_file)[1:]]:#the first line is the header-line
|
|
4247
|
+
if line[0].lower() == "scbuilder":
|
|
4248
|
+
return f"{line[1]}:{line[2]}"
|
|
4249
|
+
raise ValueError(f"No SCBuilder-image defined in '{image_definition_file}'.")
|
|
@@ -328,9 +328,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
328
328
|
codeunit_name = self.get_codeunit_name()
|
|
329
329
|
codeunit_folder = self.get_codeunit_folder()
|
|
330
330
|
# Normalize the line-endings of all non-git-ignored *.cs-files in the codeunit- and the test-project to LF.
|
|
331
|
-
|
|
332
|
-
for cs_file in self._protected_sc.get_not_git_ignored_files_of_folder(cs_source_folder, ".cs"):
|
|
333
|
-
self._protected_sc.normalize_line_endings(cs_file)
|
|
331
|
+
self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["cs"])
|
|
334
332
|
self._protected_sc.format_xml_file(os.path.join(codeunit_folder, codeunit_name, codeunit_name + ".csproj"), add_xml_declaration=False)
|
|
335
333
|
self._protected_sc.format_xml_file(os.path.join(codeunit_folder, codeunit_name + "Tests", codeunit_name + "Tests.csproj"), add_xml_declaration=False)
|
|
336
334
|
self.standardized_task_verify_standard_format_csproj_files()
|
|
@@ -347,6 +345,7 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
347
345
|
@GeneralUtilities.check_arguments
|
|
348
346
|
def do_common_tasks(self,current_codeunit_version:str,certificateGeneratorInformation:CertificateGeneratorInformationBase)-> None:
|
|
349
347
|
self.do_common_tasks_base(current_codeunit_version)
|
|
348
|
+
self.update_year_for_dotnet_codeunit()
|
|
350
349
|
codeunit_name =self.get_codeunit_name()
|
|
351
350
|
codeunit_version = self.tfcps_Tools_General.get_version_of_project(self.get_repository_folder()) # Should always be the same as the project-version #TODO make this configurable from outside
|
|
352
351
|
folder_of_current_file =os.path.join(self.get_codeunit_folder(),"Other")
|
|
@@ -680,7 +679,6 @@ class TFCPS_CodeUnitSpecific_DotNet_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
680
679
|
|
|
681
680
|
def set_dependency_version(self,name:str,new_version:str)->None:
|
|
682
681
|
raise ValueError(f"Operation is not implemented.")
|
|
683
|
-
#self.update_year_for_dotnet_codeunit()
|
|
684
682
|
#csproj_file:str=os.path.join(self.get_codeunit_folder(), self.get_codeunit_name(), self.get_codeunit_name() + ".csproj")
|
|
685
683
|
#self._protected_sc.update_dependencies_of_dotnet_project(csproj_file,[])#TODO set ignored codeunits
|
|
686
684
|
|
|
@@ -85,7 +85,9 @@ class TFCPS_CodeUnitSpecific_Flutter_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
85
85
|
|
|
86
86
|
@GeneralUtilities.check_arguments
|
|
87
87
|
def linting(self) -> None:
|
|
88
|
-
|
|
88
|
+
codeunit_folder = self.get_codeunit_folder()
|
|
89
|
+
self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["java","dart", "kt", "html"])
|
|
90
|
+
#TODO call the flutter-linting here when available
|
|
89
91
|
|
|
90
92
|
@GeneralUtilities.check_arguments
|
|
91
93
|
def do_common_tasks(self,current_codeunit_version:str )-> None:
|
|
@@ -25,16 +25,7 @@ class TFCPS_CodeUnitSpecific_NodeJS_Functions(TFCPS_CodeUnitSpecific_Base):
|
|
|
25
25
|
@GeneralUtilities.check_arguments
|
|
26
26
|
def linting(self) -> None:
|
|
27
27
|
codeunit_folder = self.get_codeunit_folder()
|
|
28
|
-
|
|
29
|
-
self._protected_sc.normalize_line_endings(ts_file)
|
|
30
|
-
for js_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".js"):
|
|
31
|
-
self._protected_sc.normalize_line_endings(js_file)
|
|
32
|
-
for css_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".css"):
|
|
33
|
-
self._protected_sc.normalize_line_endings(css_file)
|
|
34
|
-
for scss_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".scss"):
|
|
35
|
-
self._protected_sc.normalize_line_endings(scss_file)
|
|
36
|
-
for sass_file in self._protected_sc.get_not_git_ignored_files_of_folder(codeunit_folder, ".sass"):
|
|
37
|
-
self._protected_sc.normalize_line_endings(sass_file)
|
|
28
|
+
self._protected_sc.normalize_line_endings_of_files_in_folder(codeunit_folder, ["ts", "js", "css", "scss", "sass"])
|
|
38
29
|
# The OpenAPI-generator writes its '.openapi-generator/FILES' metadata-file with the host's native
|
|
39
30
|
# line-endings (CRLF on Windows, LF on Linux). Normalize it to LF like the other generated text-files
|
|
40
31
|
# so the committed file does not drift between build-hosts.
|
|
@@ -49,6 +49,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
49
49
|
product_information_file = os.path.join(self.repository, ".ScriptCollection", "ProductInformation.xml")
|
|
50
50
|
GeneralUtilities.assert_file_exists(product_information_file, f"The file '{product_information_file}' does not exist.")
|
|
51
51
|
|
|
52
|
+
|
|
52
53
|
#when the build runs inside a container, ensure the used SCBuilder-image is at least the version required by this repository (defined in .ScriptCollection/OCIImages/ImageDefinition.csv)
|
|
53
54
|
if self.sc.is_runnning_in_container():
|
|
54
55
|
scbuilder_version_environment_value = os.environ.get("SCBuilderVersion")
|
|
@@ -62,9 +63,10 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
62
63
|
if self.is_pre_merge():
|
|
63
64
|
GeneralUtilities.assert_condition(not self.__assert_no_new_changes,f"A pre-merge build can not be done with the assert-no-new-changes-option.")
|
|
64
65
|
|
|
65
|
-
#disable autocrlf for this repository so git does not rewrite line-endings on checkout/commit. otherwise the line-endings normalized by __normalize_line_endings_of_common_files would be converted back to crlf, which results in spurious uncommitted changes (and therefore in failing assert-no-new-changes-builds) on windows.
|
|
66
66
|
self.sc.git_set_local_configuration_value(self.repository, "core.autocrlf", "false")
|
|
67
67
|
|
|
68
|
+
#ensure the artifacts-folder of the repository is git-ignored so build-results never show up as uncommitted changes
|
|
69
|
+
self.sc.ensure_line_is_in_gitignore(self.repository, "Other/Resources/Artifacts")
|
|
68
70
|
|
|
69
71
|
#ensure <repo>/.ScriptCollection/.gitignore is set up (ignores the cache-folder so cache-files never show up as uncommitted changes)
|
|
70
72
|
self.sc.ensure_scriptcollection_gitignore_is_setup(self.repository)
|
|
@@ -135,7 +137,7 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
135
137
|
if self.__assert_no_new_changes:
|
|
136
138
|
self.sc.assert_no_uncommitted_changes(self.repository,"There are new uncommitted changes in the repository.")
|
|
137
139
|
|
|
138
|
-
self.
|
|
140
|
+
self.__create_artifacts_archive(codeunits)
|
|
139
141
|
|
|
140
142
|
end_time:datetime=GeneralUtilities.get_now()
|
|
141
143
|
duration=end_time-start_time
|
|
@@ -143,22 +145,43 @@ class TFCPS_CodeUnit_BuildCodeUnits:
|
|
|
143
145
|
self.sc.log.log(GeneralUtilities.get_line())
|
|
144
146
|
|
|
145
147
|
@GeneralUtilities.check_arguments
|
|
146
|
-
def
|
|
147
|
-
self.
|
|
148
|
+
def __create_artifacts_archive(self, codeunits:list[str]) -> str:
|
|
149
|
+
product_name:str=self.tfcps_tools_general.get_product_name(self.repository)
|
|
150
|
+
product_version:str=self.tfcps_tools_general.get_version_of_project(self.repository)
|
|
151
|
+
target_folder:str=os.path.join(self.repository,"Other","Resources","Artifacts")
|
|
152
|
+
target_file_zip:str=os.path.join(target_folder,f"{product_name}_Artifacts_v{product_version}.zip")
|
|
153
|
+
target_file_infotxt:str=os.path.join(target_folder,f"{product_name}_Artifacts_v{product_version}.information.txt")
|
|
154
|
+
|
|
155
|
+
artifacts_folders:dict[str,str]={}
|
|
148
156
|
for codeunit_name in codeunits:
|
|
149
157
|
artifacts_folder = os.path.join(self.repository, codeunit_name, "Other", "Artifacts")
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
158
|
+
GeneralUtilities.assert_folder_exists(artifacts_folder,f"The artifacts-folder '{artifacts_folder}' of codeunit '{codeunit_name}' does not exist.")
|
|
159
|
+
artifacts_folders[codeunit_name]=artifacts_folder
|
|
160
|
+
|
|
161
|
+
GeneralUtilities.ensure_directory_exists(target_folder)
|
|
162
|
+
GeneralUtilities.ensure_file_does_not_exist(target_file_zip)#ensure the archive of a previous build gets replaced
|
|
163
|
+
self.sc.create_zip_archive_of_folders(artifacts_folders,target_file_zip)
|
|
164
|
+
|
|
165
|
+
hash_of_zip_file:str=GeneralUtilities.get_sha256_of_file(target_file_zip)
|
|
166
|
+
creation_timestamp:datetime=GeneralUtilities.get_now()
|
|
167
|
+
GeneralUtilities.ensure_file_does_not_exist(target_file_infotxt)
|
|
168
|
+
GeneralUtilities.ensure_file_exists(target_file_infotxt)
|
|
169
|
+
information_lines:list[str]=[
|
|
170
|
+
f"Product: {product_name}",
|
|
171
|
+
f"Version: {product_version}",
|
|
172
|
+
f"Artifacts-archive-hash: {hash_of_zip_file}",
|
|
173
|
+
f"Creation-timestamp: {GeneralUtilities.datetime_to_string_for_readable_entry(creation_timestamp,False)}",
|
|
174
|
+
]
|
|
175
|
+
GeneralUtilities.write_lines_to_file(target_file_infotxt,information_lines)
|
|
176
|
+
|
|
177
|
+
self.sc.log.log(f"Created artifacts-archive \"{os.path.relpath(target_file_zip, self.repository)}\":")
|
|
178
|
+
for information_line in information_lines:
|
|
179
|
+
self.sc.log.log(f" {information_line}")
|
|
155
180
|
|
|
156
181
|
@GeneralUtilities.check_arguments
|
|
157
182
|
def __normalize_line_endings_of_common_files(self) -> None:
|
|
158
183
|
#TODO add option to define exceptions (means: files which should not be normalized).
|
|
159
|
-
|
|
160
|
-
for text_file in self.sc.get_not_git_ignored_files_of_folder(self.repository, text_file_extension):
|
|
161
|
-
self.sc.normalize_line_endings(text_file)
|
|
184
|
+
self.sc.normalize_line_endings_of_files_in_folder(self.repository, ["txt", "md", "json", "xml", "csv", "yml", "yaml", "gitignore"])
|
|
162
185
|
|
|
163
186
|
@GeneralUtilities.check_arguments
|
|
164
187
|
def is_working_branch(self)->bool:
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: scriptcollection
|
|
3
|
-
Version: 4.3.
|
|
4
|
-
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
-
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
-
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
7
|
-
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
8
|
-
Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
9
|
-
Keywords: package,release,build,management
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
14
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
-
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
16
|
-
Classifier: Topic :: System :: Logging
|
|
17
|
-
Classifier: Topic :: System :: Monitoring
|
|
18
|
-
Classifier: Topic :: System :: Archiving :: Packaging
|
|
19
|
-
Classifier: Topic :: System :: Systems Administration
|
|
20
|
-
Classifier: Topic :: Terminals
|
|
21
|
-
Classifier: Topic :: Utilities
|
|
22
|
-
Requires-Python: >=3.11
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
Requires-Dist: build>=1.5.0
|
|
25
|
-
Requires-Dist: coverage>=7.15.2
|
|
26
|
-
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
27
|
-
Requires-Dist: defusedxml>=0.7.1
|
|
28
|
-
Requires-Dist: keyboard>=0.13.5
|
|
29
|
-
Requires-Dist: lcov-cobertura>=2.1.1
|
|
30
|
-
Requires-Dist: lxml>=6.0.1
|
|
31
|
-
Requires-Dist: ntplib>=0.4.0
|
|
32
|
-
Requires-Dist: Pillow>=11.3.0
|
|
33
|
-
Requires-Dist: psutil>=7.2.2
|
|
34
|
-
Requires-Dist: pycdlib>=1.16.0
|
|
35
|
-
Requires-Dist: Pygments>=2.20.0
|
|
36
|
-
Requires-Dist: pylint>=4.0.6
|
|
37
|
-
Requires-Dist: pyOpenSSL>=25.3.0
|
|
38
|
-
Requires-Dist: PyPDF>=6.14.2
|
|
39
|
-
Requires-Dist: pytest>=8.4.2
|
|
40
|
-
Requires-Dist: PyYAML>=6.0.3
|
|
41
|
-
Requires-Dist: qrcode>=8.2.0
|
|
42
|
-
Requires-Dist: send2trash>=1.8.3
|
|
43
|
-
Requires-Dist: twine>=6.2.0
|
|
44
|
-
Requires-Dist: xmlschema>=4.3.2
|
|
45
|
-
|
|
46
|
-
# ScriptCollection
|
|
47
|
-
|
|
48
|
-
## General
|
|
49
|
-
|
|
50
|
-
[](https://pypi.org/project/ScriptCollection/)
|
|
51
|
-

|
|
52
|
-

|
|
53
|
-
|
|
54
|
-
[](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
|
|
55
|
-
[](https://pepy.tech/project/scriptcollection)
|
|
56
|
-

|
|
57
|
-
|
|
58
|
-
The ScriptCollection is the place for reusable scripts.
|
|
59
|
-
|
|
60
|
-
## Reference
|
|
61
|
-
|
|
62
|
-
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
63
|
-
|
|
64
|
-
## Hints
|
|
65
|
-
|
|
66
|
-
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
67
|
-
|
|
68
|
-
Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
|
|
69
|
-
|
|
70
|
-
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
71
|
-
|
|
72
|
-
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
73
|
-
|
|
74
|
-
## Get ScriptCollection
|
|
75
|
-
|
|
76
|
-
### Installation via pip
|
|
77
|
-
|
|
78
|
-
`pip3 install ScriptCollection`
|
|
79
|
-
|
|
80
|
-
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
81
|
-
|
|
82
|
-
### Download sourcecode using git
|
|
83
|
-
|
|
84
|
-
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
85
|
-
|
|
86
|
-
`git clone https://github.com/anionDevevlopment/ScriptCollection.git`
|
|
87
|
-
|
|
88
|
-
It may be more easy to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
89
|
-
|
|
90
|
-
## Troubleshooting
|
|
91
|
-
|
|
92
|
-
It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevevlopment/ScriptCollection/issues).
|
|
93
|
-
|
|
94
|
-
If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
|
|
95
|
-
|
|
96
|
-
```lang-bash
|
|
97
|
-
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
98
|
-
ScriptCollectionCore.get_scriptcollection_version()
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
|
|
102
|
-
|
|
103
|
-
## Development
|
|
104
|
-
|
|
105
|
-
### Branching-system
|
|
106
|
-
|
|
107
|
-
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
108
|
-
|
|
109
|
-
### Repository-structure
|
|
110
|
-
|
|
111
|
-
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
|
|
112
|
-
|
|
113
|
-
### Install dependencies
|
|
114
|
-
|
|
115
|
-
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
116
|
-
|
|
117
|
-
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
118
|
-
|
|
119
|
-
- `python` (on some systems `python3`)
|
|
120
|
-
- `pip3`
|
|
121
|
-
|
|
122
|
-
The pip-packages which are required for developing on this project are defined in `requirements.txt`.
|
|
123
|
-
|
|
124
|
-
### IDE
|
|
125
|
-
|
|
126
|
-
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
127
|
-
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
128
|
-
|
|
129
|
-
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
130
|
-
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
131
|
-
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
132
|
-
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
133
|
-
|
|
134
|
-
### Build
|
|
135
|
-
|
|
136
|
-
To create and install an ScriptCollection locally simply do the following commands:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
python ./ScriptCollection/Other/Build/Build.py
|
|
140
|
-
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
144
|
-
|
|
145
|
-
### Coding style
|
|
146
|
-
|
|
147
|
-
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
148
|
-
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
149
|
-
|
|
150
|
-
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
151
|
-
|
|
152
|
-
## Runtime dependencies
|
|
153
|
-
|
|
154
|
-
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
155
|
-
|
|
156
|
-
The usual Python-dependencies will be installed automagically by `pip`.
|
|
157
|
-
|
|
158
|
-
For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
159
|
-
|
|
160
|
-
- chmod
|
|
161
|
-
- chown
|
|
162
|
-
- ls
|
|
163
|
-
|
|
164
|
-
This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
|
|
165
|
-
|
|
166
|
-
## License
|
|
167
|
-
|
|
168
|
-
See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scriptcollection
|
|
3
|
+
Version: 4.3.47
|
|
4
|
+
Summary: The ScriptCollection is the place for reusable scripts.
|
|
5
|
+
Author-email: Marius Göcke <marius.goecke@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
|
|
7
|
+
Project-URL: Documentation, https://aniondev.github.io/ScriptCollectionReference/index.html
|
|
8
|
+
Project-URL: Changelog, https://github.com/anionDev/ScriptCollection/tree/main/Other/Resources/Changelog
|
|
9
|
+
Keywords: package,release,build,management
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
14
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
|
|
16
|
+
Classifier: Topic :: System :: Logging
|
|
17
|
+
Classifier: Topic :: System :: Monitoring
|
|
18
|
+
Classifier: Topic :: System :: Archiving :: Packaging
|
|
19
|
+
Classifier: Topic :: System :: Systems Administration
|
|
20
|
+
Classifier: Topic :: Terminals
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
Requires-Dist: build>=1.5.0
|
|
25
|
+
Requires-Dist: coverage>=7.15.2
|
|
26
|
+
Requires-Dist: cyclonedx-bom>=7.1.0
|
|
27
|
+
Requires-Dist: defusedxml>=0.7.1
|
|
28
|
+
Requires-Dist: keyboard>=0.13.5
|
|
29
|
+
Requires-Dist: lcov-cobertura>=2.1.1
|
|
30
|
+
Requires-Dist: lxml>=6.0.1
|
|
31
|
+
Requires-Dist: ntplib>=0.4.0
|
|
32
|
+
Requires-Dist: Pillow>=11.3.0
|
|
33
|
+
Requires-Dist: psutil>=7.2.2
|
|
34
|
+
Requires-Dist: pycdlib>=1.16.0
|
|
35
|
+
Requires-Dist: Pygments>=2.20.0
|
|
36
|
+
Requires-Dist: pylint>=4.0.6
|
|
37
|
+
Requires-Dist: pyOpenSSL>=25.3.0
|
|
38
|
+
Requires-Dist: PyPDF>=6.14.2
|
|
39
|
+
Requires-Dist: pytest>=8.4.2
|
|
40
|
+
Requires-Dist: PyYAML>=6.0.3
|
|
41
|
+
Requires-Dist: qrcode>=8.2.0
|
|
42
|
+
Requires-Dist: send2trash>=1.8.3
|
|
43
|
+
Requires-Dist: twine>=6.2.0
|
|
44
|
+
Requires-Dist: xmlschema>=4.3.2
|
|
45
|
+
|
|
46
|
+
# ScriptCollection
|
|
47
|
+
|
|
48
|
+
## General
|
|
49
|
+
|
|
50
|
+
[](https://pypi.org/project/ScriptCollection/)
|
|
51
|
+

|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
[](https://www.codefactor.io/repository/github/anionDevevlopment/scriptcollection/overview/main)
|
|
55
|
+
[](https://pepy.tech/project/scriptcollection)
|
|
56
|
+

|
|
57
|
+
|
|
58
|
+
The ScriptCollection is the place for reusable scripts.
|
|
59
|
+
|
|
60
|
+
## Reference
|
|
61
|
+
|
|
62
|
+
The reference can be found [here](https://aniondev.github.io/ScriptCollectionReference/index.html).
|
|
63
|
+
|
|
64
|
+
## Hints
|
|
65
|
+
|
|
66
|
+
Most of the scripts are written in [python](https://www.python.org) 3.
|
|
67
|
+
|
|
68
|
+
Caution: Before executing **any** script of this repository read the sourcecode of the script (and the sourcecode of all functions called by this function directly or transitively) carefully and verify that the script does exactly what you want to do and nothing else.
|
|
69
|
+
|
|
70
|
+
Some functions are not entirely available on windows or require common third-party tools. See the [Runtime dependencies](#runtime-dependencies)-section for more information.
|
|
71
|
+
|
|
72
|
+
When using ScriptCollection it is not required but recommended for better usability to have [epew](https://github.com/anionDev/Epew) installed.
|
|
73
|
+
|
|
74
|
+
## Get ScriptCollection
|
|
75
|
+
|
|
76
|
+
### Installation via pip
|
|
77
|
+
|
|
78
|
+
`pip3 install ScriptCollection`
|
|
79
|
+
|
|
80
|
+
See the [PyPI-site for ScriptCollection](https://pypi.org/project/ScriptCollection)
|
|
81
|
+
|
|
82
|
+
### Download sourcecode using git
|
|
83
|
+
|
|
84
|
+
You can simply git-clone the ScriptCollection and then use the scripts under the provided license.
|
|
85
|
+
|
|
86
|
+
`git clone https://github.com/anionDevevlopment/ScriptCollection.git`
|
|
87
|
+
|
|
88
|
+
It may be more easy to pip-install the ScriptCollection but technically pip is not required. Actually you need to git-clone (or download as zip-file from [GitHub](https://github.com/anionDevevlopment/ScriptCollection) the ScriptCollection to use the scripts in this repository which are not written in python.
|
|
89
|
+
|
|
90
|
+
## Troubleshooting
|
|
91
|
+
|
|
92
|
+
It is recommended to always use only the newest version of the ScriptCollection. If you have an older version: Update it (e. g. using `pip3 install ScriptCollection --upgrade` if you installed the ScriptCollection via pip). If you still have problems, then feel free to create an [issue](https://github.com/anionDevevlopment/ScriptCollection/issues).
|
|
93
|
+
|
|
94
|
+
If you have installed the ScriptCollection as pip-package you can simply check the version using Python with the following commands:
|
|
95
|
+
|
|
96
|
+
```lang-bash
|
|
97
|
+
from ScriptCollection.ScriptCollectionCore import ScriptCollectionCore
|
|
98
|
+
ScriptCollectionCore.get_scriptcollection_version()
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or you can simply run `pip3 freeze` folder to get information about (all) currently installed pip-packages.
|
|
102
|
+
|
|
103
|
+
## Development
|
|
104
|
+
|
|
105
|
+
### Branching-system
|
|
106
|
+
|
|
107
|
+
This repository applies the [GitFlowSimplified](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/BranchingSystem/GitFlowSimplified/GitFlowSimplified.md)-branching-system.
|
|
108
|
+
|
|
109
|
+
### Repository-structure
|
|
110
|
+
|
|
111
|
+
This repository applies the [CommonProjectStructure](https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/blob/main/Conventions/RepositoryStructure/CommonProjectStructure/CommonProjectStructure.md)-branching-system.
|
|
112
|
+
|
|
113
|
+
### Install dependencies
|
|
114
|
+
|
|
115
|
+
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
116
|
+
|
|
117
|
+
To develop ScriptCollection it is obviously required that the following commandline-commands are available on your system:
|
|
118
|
+
|
|
119
|
+
- `python` (on some systems `python3`)
|
|
120
|
+
- `pip3`
|
|
121
|
+
|
|
122
|
+
The pip-packages which are required for developing on this project are defined in `requirements.txt`.
|
|
123
|
+
|
|
124
|
+
### IDE
|
|
125
|
+
|
|
126
|
+
The recommended IDE for developing ScriptCollection is Visual Studio Code.
|
|
127
|
+
The recommended addons for developing ScriptCollection with Visual Studio Code are:
|
|
128
|
+
|
|
129
|
+
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance)
|
|
130
|
+
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
|
|
131
|
+
- [Spell Right](https://marketplace.visualstudio.com/items?itemName=ban.spellright)
|
|
132
|
+
- [docs-markdown](https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-markdown)
|
|
133
|
+
|
|
134
|
+
### Build
|
|
135
|
+
|
|
136
|
+
To create and install an ScriptCollection locally simply do the following commands:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
python ./ScriptCollection/Other/Build/Build.py
|
|
140
|
+
pip3 install --force-reinstall ./ScriptCollection/Other/Artifacts/Wheel/ScriptCollection-x.x.x-py3-none-any.whl
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
(Note: `x.x.x` must be replaced by the appropriate version-number.)
|
|
144
|
+
|
|
145
|
+
### Coding style
|
|
146
|
+
|
|
147
|
+
In this repository [pylint](https://pylint.org/) will be used to report linting-issues.
|
|
148
|
+
If you change code in this repository please ensure pylint does not find any issues before creating a pull-request.
|
|
149
|
+
|
|
150
|
+
If linting-issues exist in the current code-base can be checked by running `python ./ScriptCollection/Other/QualityCheck/Linting.py`.
|
|
151
|
+
|
|
152
|
+
## Runtime dependencies
|
|
153
|
+
|
|
154
|
+
ScriptCollection requires [Python](https://www.python.org) 3.10.
|
|
155
|
+
|
|
156
|
+
The usual Python-dependencies will be installed automagically by `pip`.
|
|
157
|
+
|
|
158
|
+
For functions to to read or change the permissions or the owner of a file the ScriptCollection relies on the functionality of the following tools:
|
|
159
|
+
|
|
160
|
+
- chmod
|
|
161
|
+
- chown
|
|
162
|
+
- ls
|
|
163
|
+
|
|
164
|
+
This tools must be available on the system where the functions should be executed. Meanwhile this tools are also available on Windows but may have a slightly limited functionality.
|
|
165
|
+
|
|
166
|
+
## License
|
|
167
|
+
|
|
168
|
+
See [License.txt](https://raw.githubusercontent.com/anionDevevlopment/ScriptCollection/main/License.txt) for license-information.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
ScriptCollection/AnionBuildPlatform.py,sha256=GP-jnb1GbvT8jzlH-cqnxgOzBzeUdiaWnDXtKNjsxiA,12153
|
|
2
2
|
ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
|
|
3
|
-
ScriptCollection/Executables.py,sha256=
|
|
3
|
+
ScriptCollection/Executables.py,sha256=cSnyAwQq3c79hKrARAh0MO3SH61iTtxwjfr0cchECro,67063
|
|
4
4
|
ScriptCollection/GeneralUtilities.py,sha256=qYhrKkwbEewGIppuxYRmGhLP50C443tw7sBlwH7Mkbc,71606
|
|
5
5
|
ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
|
|
6
6
|
ScriptCollection/ProcessesRunner.py,sha256=yYaC95h40uszuZPggn2kK3qXIN2ZjGMCavo-NQ53ElQ,1537
|
|
@@ -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=RXsiceQ8W6a8YDk_2BPscVbIAmDIpIxqe9WHBy2r4CM,5233
|
|
11
11
|
ScriptCollection/SCLog.py,sha256=LdzSJy3NnnwYCCefz2h4tiTy4BjT8lOz3IBG_bMOg9E,4821
|
|
12
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
12
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=p_aLrI1CymPmdpJ8r-MGP5FWKyiURNZjbJww5tiSCQc,248737
|
|
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=WO2M28c2tUwsXFNa2L9zqMhdlyObWm3qpPE0LdIs7SE,2315
|
|
@@ -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=H9FWlS6BPK-UWJXdWN686ePky4Hq-Q13T0Kx8HSJu7s,34990
|
|
37
37
|
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=Ll5EOkpVpPiFrM2mLeQXolaF7075IwgtnHXvfdpkH4k,9904
|
|
38
|
-
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=
|
|
38
|
+
ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=6d-QBNA9Bw47JRRdVgEu6WWO5WHX_RB_jNzlNq3qfqA,33611
|
|
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=zp7n0Li7GTi4tERDMgDcJ-o3m6131m31zvkat0lALEc,7781
|
|
@@ -49,22 +49,22 @@ ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
49
49
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationBase.py,sha256=bT6Gd5pQpZCw4OQz6HWkPCSn5z__eUUEisABLDSxd0o,200
|
|
50
50
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationGenerate.py,sha256=QyjOfMY22JWCvKjMelHiDWbJiWqotOfebpJpgDUaoO4,237
|
|
51
51
|
ScriptCollection/TFCPS/DotNet/CertificateGeneratorInformationNoGenerate.py,sha256=i0zEGehj0sttxjjZtoq2KFSKp_ulxVyWp_ZgAhIY_So,241
|
|
52
|
-
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=
|
|
52
|
+
ScriptCollection/TFCPS/DotNet/TFCPS_CodeUnitSpecific_DotNet.py,sha256=ovi0WKgNykkGVQBLI6F5IS3xUD53MxqOgZWF1W2RnCw,46368
|
|
53
53
|
ScriptCollection/TFCPS/DotNet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
|
-
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=
|
|
54
|
+
ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=CwDBogG7Lg3IyywpCGta9gcaqWpgjENNXaupS19ZwTM,8751
|
|
55
55
|
ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
56
|
ScriptCollection/TFCPS/Go/TFCPS_CodeUnitSpecific_Go.py,sha256=kyx26AnT1-LySFA46wfJ9yZUKYdMWTD0U2XZfSQbuB0,3497
|
|
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=doXQZKwTh1AI3he0DHRzl3dDCbo3nPq4odmZR6u-JxQ,13579
|
|
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.47.dist-info/METADATA,sha256=G_2TqST5k5NBQW1Gnm83whVm1bV7ukqvQEBaXsRyl6Q,7816
|
|
67
|
+
scriptcollection-4.3.47.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
68
|
+
scriptcollection-4.3.47.dist-info/entry_points.txt,sha256=xWOFHGufgef8jsKQ3c2pFBfM_hjweFXuxfKmghQs-VI,5814
|
|
69
|
+
scriptcollection-4.3.47.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
70
|
+
scriptcollection-4.3.47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|