ScriptCollection 3.5.99__py3-none-any.whl → 3.5.100__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/GeneralUtilities.py +1 -0
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TasksForCommonProjectStructure.py +20 -1
- {scriptcollection-3.5.99.dist-info → scriptcollection-3.5.100.dist-info}/METADATA +2 -2
- {scriptcollection-3.5.99.dist-info → scriptcollection-3.5.100.dist-info}/RECORD +8 -8
- {scriptcollection-3.5.99.dist-info → scriptcollection-3.5.100.dist-info}/WHEEL +0 -0
- {scriptcollection-3.5.99.dist-info → scriptcollection-3.5.100.dist-info}/entry_points.txt +0 -0
- {scriptcollection-3.5.99.dist-info → scriptcollection-3.5.100.dist-info}/top_level.txt +0 -0
@@ -952,6 +952,7 @@ class GeneralUtilities:
|
|
952
952
|
@staticmethod
|
953
953
|
@check_arguments
|
954
954
|
def replace_variable_in_string(input_string: str, variable_name: str, variable_value: str) -> None:
|
955
|
+
GeneralUtilities.assert_condition(not "__" in variable_name, f"'{variable_name}' is an invalid variable name because it contains '__' which is treated as control-sequence.")
|
955
956
|
return input_string.replace(f"__[{variable_name}]__", variable_value)
|
956
957
|
|
957
958
|
@staticmethod
|
@@ -2886,9 +2886,28 @@ class TasksForCommonProjectStructure:
|
|
2886
2886
|
shutil.make_archive(name_of_new_artifact, 'zip', src_artifact_folder)
|
2887
2887
|
archive_file = os.path.join(os.getcwd(), f"{name_of_new_artifact}.zip")
|
2888
2888
|
target_folder = GeneralUtilities.resolve_relative_path(f"Other/Artifacts/{name_of_new_artifact}", codeunit_folder)
|
2889
|
-
GeneralUtilities.
|
2889
|
+
GeneralUtilities.ensure_folder_exists_and_is_empty(target_folder)
|
2890
2890
|
shutil.move(archive_file, target_folder)
|
2891
2891
|
|
2892
|
+
def generate_winget_zip_manifest(self, codeunit_folder: str, artifact_name_of_zip: str):
|
2893
|
+
self.assert_is_codeunit_folder(codeunit_folder)
|
2894
|
+
codeunit_version = self.get_version_of_codeunit_folder(codeunit_folder)
|
2895
|
+
build_folder = os.path.join(codeunit_folder, "Other", "Build")
|
2896
|
+
artifacts_folder = os.path.join(codeunit_folder, "Other", "Artifacts", artifact_name_of_zip)
|
2897
|
+
GeneralUtilities.assert_folder_exists(artifacts_folder)
|
2898
|
+
artifacts_file = ScriptCollectionCore().find_file_by_extension(artifacts_folder, "zip")
|
2899
|
+
winget_template_file = os.path.join(build_folder, "WinGet-Template.yaml")
|
2900
|
+
winget_manifest_file = os.path.join(build_folder, "WinGet-Manifest.yaml")
|
2901
|
+
GeneralUtilities.assert_file_exists(winget_template_file)
|
2902
|
+
GeneralUtilities.ensure_file_exists(winget_manifest_file)
|
2903
|
+
manifest_content = GeneralUtilities.read_text_from_file(winget_template_file)
|
2904
|
+
manifest_content = GeneralUtilities.replace_variable_in_string(manifest_content, "version", codeunit_version)
|
2905
|
+
manifest_content = GeneralUtilities.replace_variable_in_string(manifest_content, "sha256_hashvalue", GeneralUtilities.get_sha256_of_file(artifacts_file))
|
2906
|
+
GeneralUtilities.write_text_to_file(winget_manifest_file, manifest_content)
|
2907
|
+
target_folder = os.path.join(codeunit_folder, "Other", "Artifacts", "WinGet-Manifest")
|
2908
|
+
GeneralUtilities.ensure_folder_exists_and_is_empty(target_folder)
|
2909
|
+
shutil.copy(winget_manifest_file, target_folder)
|
2910
|
+
|
2892
2911
|
@GeneralUtilities.check_arguments
|
2893
2912
|
def update_year_in_license_file_in_common_scripts_file(self, common_tasks_scripts_file: str) -> None:
|
2894
2913
|
self.update_year_in_license_file(GeneralUtilities.resolve_relative_path("../../..", common_tasks_scripts_file))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ScriptCollection
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.100
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
5
5
|
Home-page: https://github.com/anionDev/ScriptCollection
|
6
6
|
Author: Marius Göcke
|
@@ -23,7 +23,7 @@ Classifier: Topic :: Utilities
|
|
23
23
|
Requires-Python: >=3.10
|
24
24
|
Description-Content-Type: text/markdown
|
25
25
|
Requires-Dist: build>=1.2.2.post1
|
26
|
-
Requires-Dist: coverage>=7.
|
26
|
+
Requires-Dist: coverage>=7.7.0
|
27
27
|
Requires-Dist: cyclonedx-bom>=5.3.0
|
28
28
|
Requires-Dist: defusedxml>=0.7.1
|
29
29
|
Requires-Dist: keyboard>=0.13.5
|
@@ -1,17 +1,17 @@
|
|
1
1
|
ScriptCollection/Executables.py,sha256=HI9Pxs5Z9QxPGyqeJU2lWslEggFyGYANCqYVQZp6eJ0,30490
|
2
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
2
|
+
ScriptCollection/GeneralUtilities.py,sha256=unOZbHDqlxwPHXY1epy4gdGYwDbHEETF1XKZYPGX2hw,42429
|
3
3
|
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
4
4
|
ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
|
5
5
|
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
6
6
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
7
7
|
ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
|
8
8
|
ScriptCollection/SCLog.py,sha256=l4aekBiGoNkKGtvO_Er3NY_K7ts4ZWtIGlhq07I-4LY,30
|
9
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
10
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
9
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=UxY2NmrtgK-GJmuSpANtgUoxjbwVqti1rrR55Rz13DU,123984
|
10
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=CkLRb4-ldwVuc6XlORxxyhN3GDR8TZSfe3DUqRl0SKg,230241
|
11
11
|
ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
|
12
12
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
-
scriptcollection-3.5.
|
14
|
-
scriptcollection-3.5.
|
15
|
-
scriptcollection-3.5.
|
16
|
-
scriptcollection-3.5.
|
17
|
-
scriptcollection-3.5.
|
13
|
+
scriptcollection-3.5.100.dist-info/METADATA,sha256=MxfzekKeh4Ed-NOAXbl1CEEB_nVgb5ibJ_ZwZxvFnlg,7664
|
14
|
+
scriptcollection-3.5.100.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
15
|
+
scriptcollection-3.5.100.dist-info/entry_points.txt,sha256=fYCGWGNGijBQHhFe6UAO-BEpfEOxLyNJemukt5ElSzs,3644
|
16
|
+
scriptcollection-3.5.100.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
17
|
+
scriptcollection-3.5.100.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|