ScriptCollection 3.5.81__py3-none-any.whl → 3.5.83__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 +10 -0
- ScriptCollection/ScriptCollectionCore.py +36 -1
- ScriptCollection/TasksForCommonProjectStructure.py +11 -5
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.83.dist-info}/METADATA +1 -1
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.83.dist-info}/RECORD +8 -8
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.83.dist-info}/WHEEL +0 -0
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.83.dist-info}/entry_points.txt +0 -0
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.83.dist-info}/top_level.txt +0 -0
|
@@ -943,11 +943,21 @@ class GeneralUtilities:
|
|
|
943
943
|
def assert_file_exists(file: str) -> str:
|
|
944
944
|
GeneralUtilities.assert_condition(os.path.isfile(file), f"File '{file}' does not exist.")
|
|
945
945
|
|
|
946
|
+
@staticmethod
|
|
947
|
+
@check_arguments
|
|
948
|
+
def assert_file_does_not_exist(file: str) -> str:
|
|
949
|
+
GeneralUtilities.assert_condition(not os.path.isfile(file), f"File '{file}' exists.")
|
|
950
|
+
|
|
946
951
|
@staticmethod
|
|
947
952
|
@check_arguments
|
|
948
953
|
def assert_folder_exists(folder: str) -> str:
|
|
949
954
|
GeneralUtilities.assert_condition(os.path.isdir(folder), f"Folder '{folder}' does not exist.")
|
|
950
955
|
|
|
956
|
+
@staticmethod
|
|
957
|
+
@check_arguments
|
|
958
|
+
def assert_folder_does_not_exist(folder: str) -> str:
|
|
959
|
+
GeneralUtilities.assert_condition(not os.path.isdir(folder), f"Folder '{folder}' exists.")
|
|
960
|
+
|
|
951
961
|
@staticmethod
|
|
952
962
|
@check_arguments
|
|
953
963
|
def retry_action(action, amount_of_attempts: int,action_name:str=None) -> None:
|
|
@@ -32,7 +32,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
32
32
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
33
33
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
|
34
34
|
|
|
35
|
-
version = "3.5.
|
|
35
|
+
version = "3.5.83"
|
|
36
36
|
__version__ = version
|
|
37
37
|
|
|
38
38
|
|
|
@@ -1826,6 +1826,41 @@ DNS = {domain}
|
|
|
1826
1826
|
GeneralUtilities.write_message_to_stdout(f"Update package {package_name}...")
|
|
1827
1827
|
self.run_program("dotnet", f"add {csproj_filename} package {package_name}", folder,print_errors_as_information=True)
|
|
1828
1828
|
|
|
1829
|
+
|
|
1830
|
+
@GeneralUtilities.check_arguments
|
|
1831
|
+
def dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1832
|
+
default_source_address="nuget.org"
|
|
1833
|
+
if source==default_source_address:
|
|
1834
|
+
GeneralUtilities.write_message_to_stdout(f"Wait until package {package_name} v{package_version} is available on {source}.")
|
|
1835
|
+
headers = {'Cache-Control': 'no-cache'}
|
|
1836
|
+
r=requests.get(f"https://api.{default_source_address}/v3-flatcontainer/{package_name.lower()}/{package_version}/{package_name.lower()}.nuspec", timeout=5,headers=headers)
|
|
1837
|
+
return r.status_code==200
|
|
1838
|
+
else:
|
|
1839
|
+
raise ValueError(f"dotnet_package_is_available is not implemented yet for other sources than {default_source_address}.")
|
|
1840
|
+
|
|
1841
|
+
@GeneralUtilities.check_arguments
|
|
1842
|
+
def wait_until_dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1843
|
+
while not self.dotnet_package_is_available(package_name,package_version,source):
|
|
1844
|
+
time.sleep(5)
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
@GeneralUtilities.check_arguments
|
|
1848
|
+
def python_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1849
|
+
default_source_address="pypi.org"
|
|
1850
|
+
if source==default_source_address:
|
|
1851
|
+
GeneralUtilities.write_message_to_stdout(f"Wait until package {package_name} v{package_version} is available on {source}.")
|
|
1852
|
+
headers = {'Cache-Control': 'no-cache'}
|
|
1853
|
+
r=requests.get(f"https://{default_source_address}/pypi/{package_name}/{package_version}/json", timeout=5,headers=headers)
|
|
1854
|
+
return r.status_code==200
|
|
1855
|
+
else:
|
|
1856
|
+
raise ValueError(f"python_package_is_available is not implemented yet for other sources than {default_source_address}.")
|
|
1857
|
+
|
|
1858
|
+
@GeneralUtilities.check_arguments
|
|
1859
|
+
def python_until_dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1860
|
+
while not self.python_package_is_available(package_name,package_version,source):
|
|
1861
|
+
time.sleep(5)
|
|
1862
|
+
|
|
1863
|
+
|
|
1829
1864
|
@GeneralUtilities.check_arguments
|
|
1830
1865
|
def create_deb_package(self, toolname: str, binary_folder: str, control_file_content: str, deb_output_folder: str, verbosity: int, permission_of_executable_file_as_octet_triple: int) -> None:
|
|
1831
1866
|
|
|
@@ -1018,7 +1018,7 @@ class TasksForCommonProjectStructure:
|
|
|
1018
1018
|
target_folder_base = os.path.join(information.artifacts_folder, information.projectname, project_version)
|
|
1019
1019
|
GeneralUtilities.ensure_directory_exists(target_folder_base)
|
|
1020
1020
|
|
|
1021
|
-
self.build_codeunits(information.repository, information.verbosity, information.target_environmenttype_for_productive, information.additional_arguments_file, False, information.export_target, [], True, "
|
|
1021
|
+
self.build_codeunits(information.repository, information.verbosity, information.target_environmenttype_for_productive, information.additional_arguments_file, False, information.export_target, [], True, "Generate artifacts")# Generate artifacts after merge (because now are constants like commit-id of the new version available)
|
|
1022
1022
|
|
|
1023
1023
|
reference_folder = os.path.join(information.reference_repository, "ReferenceContent")
|
|
1024
1024
|
|
|
@@ -1034,8 +1034,8 @@ class TasksForCommonProjectStructure:
|
|
|
1034
1034
|
|
|
1035
1035
|
# Copy reference of codeunit to reference-repository
|
|
1036
1036
|
codeunit_version = self.get_version_of_codeunit_folder(os.path.join(information.repository, codeunitname))
|
|
1037
|
-
self.__export_codeunit_reference_content_to_reference_repository(f"v{project_version}", False, reference_folder, information.repository, codeunitname, information.projectname, codeunit_version, information.public_repository_url,
|
|
1038
|
-
self.__export_codeunit_reference_content_to_reference_repository("Latest", True, reference_folder, information.repository, codeunitname, information.projectname, codeunit_version, information.public_repository_url,
|
|
1037
|
+
self.__export_codeunit_reference_content_to_reference_repository(f"v{project_version}", False, reference_folder, information.repository, codeunitname, information.projectname, codeunit_version, information.public_repository_url, f"v{project_version}")
|
|
1038
|
+
self.__export_codeunit_reference_content_to_reference_repository("Latest", True, reference_folder, information.repository, codeunitname, information.projectname, codeunit_version, information.public_repository_url, information.target_branch_name)
|
|
1039
1039
|
|
|
1040
1040
|
# Generate reference
|
|
1041
1041
|
self.__generate_entire_reference(information.projectname, project_version, reference_folder)
|
|
@@ -1315,7 +1315,7 @@ class TasksForCommonProjectStructure:
|
|
|
1315
1315
|
self.__sc.run_program("git", "clean -dfx", information.repository, verbosity=information.verbosity, throw_exception_if_exitcode_is_not_zero=True)
|
|
1316
1316
|
project_version = self.__sc.get_semver_version_from_gitversion(information.repository)
|
|
1317
1317
|
|
|
1318
|
-
self.build_codeunits(information.repository, information.verbosity, information.target_environmenttype_for_qualitycheck, information.additional_arguments_file, False, information.export_target, [], True, "Productive build")
|
|
1318
|
+
self.build_codeunits(information.repository, information.verbosity, information.target_environmenttype_for_qualitycheck, information.additional_arguments_file, False, information.export_target, [], True, "Productive build")#verify hat codeunits are buildable with productive-config before merge
|
|
1319
1319
|
|
|
1320
1320
|
self.assert_no_uncommitted_changes(information.repository)
|
|
1321
1321
|
|
|
@@ -1948,10 +1948,16 @@ class TasksForCommonProjectStructure:
|
|
|
1948
1948
|
src_file_psw = os.path.join(src_folder, f"{codeunit_name}{certificate_resource_name}.password")
|
|
1949
1949
|
|
|
1950
1950
|
trg_folder = os.path.join(codeunit_folder, "Other", "Workspace", "Configuration", "Certificates")
|
|
1951
|
-
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1952
1951
|
trg_file_pfx = os.path.join(trg_folder, f"{domain}.pfx")
|
|
1953
1952
|
trg_file_psw = os.path.join(trg_folder, f"{domain}.password")
|
|
1954
1953
|
|
|
1954
|
+
GeneralUtilities.assert_file_exists(src_file_pfx)
|
|
1955
|
+
GeneralUtilities.assert_file_exists(src_file_psw)
|
|
1956
|
+
GeneralUtilities.ensure_file_does_not_exist(trg_file_pfx)
|
|
1957
|
+
GeneralUtilities.ensure_file_does_not_exist(trg_file_psw)
|
|
1958
|
+
|
|
1959
|
+
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1960
|
+
|
|
1955
1961
|
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1956
1962
|
shutil.copyfile(src_file_pfx, trg_file_pfx)
|
|
1957
1963
|
shutil.copyfile(src_file_psw, trg_file_psw)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
ScriptCollection/Executables.py,sha256=KAs82A9AsrpTY39Ohg1UrtZN-6e5_Ql17UbLlO0fZfA,30037
|
|
2
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
2
|
+
ScriptCollection/GeneralUtilities.py,sha256=VVbbGFD4qLwWV211-E-n3faP2fZGc8mOBlKLd0oKHl4,40765
|
|
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
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
9
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
|
8
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=DMAt3OV5-ydbKKFbc_1MV9i1Bv_1sK_2AsBez-_HJ-o,121187
|
|
9
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=n6og3gADK7oBd5_9F-XNKVlQ0bO9EL7irdOSJAh-Vtc,215940
|
|
10
10
|
ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
|
|
11
11
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
ScriptCollection-3.5.
|
|
13
|
-
ScriptCollection-3.5.
|
|
14
|
-
ScriptCollection-3.5.
|
|
15
|
-
ScriptCollection-3.5.
|
|
16
|
-
ScriptCollection-3.5.
|
|
12
|
+
ScriptCollection-3.5.83.dist-info/METADATA,sha256=4K38CjZq0Ik1dmTNilhSXT-uGpNbKMWl_tsovThshbA,7664
|
|
13
|
+
ScriptCollection-3.5.83.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
14
|
+
ScriptCollection-3.5.83.dist-info/entry_points.txt,sha256=1jAL5AuB8mvdw2v-6E7wCZFThurQxchiQynL8DCi-Yg,3545
|
|
15
|
+
ScriptCollection-3.5.83.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
16
|
+
ScriptCollection-3.5.83.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|