ScriptCollection 3.5.23__py3-none-any.whl → 3.5.24__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.
@@ -30,7 +30,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
30
30
  from .ProgramRunnerPopen import ProgramRunnerPopen
31
31
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
32
32
 
33
- version = "3.5.23"
33
+ version = "3.5.24"
34
34
  __version__ = version
35
35
 
36
36
 
@@ -1287,8 +1287,9 @@ class TasksForCommonProjectStructure:
1287
1287
  codeunitname: str = Path(os.path.dirname(build_script_file)).parent.parent.name
1288
1288
  codeunit_folder = GeneralUtilities.resolve_relative_path("../..", str(os.path.dirname(build_script_file)))
1289
1289
  codeunitname_lower = codeunitname.lower()
1290
- codeunitversion = self.get_version_of_codeunit(os.path.join(codeunit_folder, f"{codeunitname}.codeunit.xml"))
1291
- args = ["image", "build", "--pull", "--force-rm", "--progress=plain", "--build-arg", f"TargetEnvironmentType={target_environment_type}", "--build-arg", f"Version={codeunitversion}"]
1290
+ codeunit_file = os.path.join(codeunit_folder, f"{codeunitname}.codeunit.xml")
1291
+ codeunitversion = self.get_version_of_codeunit(codeunit_file)
1292
+ args = ["image", "build", "--pull", "--force-rm", "--progress=plain", "--build-arg", f"TargetEnvironmentType={target_environment_type}", "--build-arg", f"CodeUnitName={codeunitname}", "--build-arg", f"CodeUnitVersion={codeunitversion}", "--build-arg", f"CodeUnitOwnerName={self.get_codeunit_owner_name(codeunit_file)}", "--build-arg", f"CodeUnitOwnerEMailAddress={self.get_codeunit_owner_emailaddress(codeunit_file)}"]
1292
1293
  for custom_argument_key, custom_argument_value in custom_arguments.items():
1293
1294
  args.append("--build-arg")
1294
1295
  args.append(f"{custom_argument_key}={custom_argument_value}")
@@ -1430,11 +1431,11 @@ class TasksForCommonProjectStructure:
1430
1431
  raise ValueError(f"The folder-name ('{codeunit_name}') is not equal to the codeunit-name ('{codeunit_name_in_codeunit_file}').")
1431
1432
 
1432
1433
  # Check owner-name
1433
- codeunit_ownername_in_codeunit_file = root.xpath('//cps:codeunit/cps:codeunitownername/text()', namespaces=namespaces)[0]
1434
+ codeunit_ownername_in_codeunit_file = self. get_codeunit_owner_name(codeunit_file)
1434
1435
  GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(codeunit_ownername_in_codeunit_file), "No valid name for codeunitowner given.")
1435
1436
 
1436
1437
  # Check owner-emailaddress
1437
- codeunit_owneremailaddress_in_codeunit_file = root.xpath('//cps:codeunit/cps:codeunitowneremailaddress/text()', namespaces=namespaces)[0]
1438
+ codeunit_owneremailaddress_in_codeunit_file = self.get_codeunit_owner_emailaddress(codeunit_file)
1438
1439
  GeneralUtilities.assert_condition(GeneralUtilities.string_has_content(codeunit_owneremailaddress_in_codeunit_file), "No valid email-address for codeunitowner given.")
1439
1440
 
1440
1441
  # Check development-state
@@ -1512,6 +1513,22 @@ class TasksForCommonProjectStructure:
1512
1513
  # Generate diff-report
1513
1514
  self.generate_diff_report(repository_folder, codeunit_name, codeunit_version)
1514
1515
 
1516
+ @GeneralUtilities.check_arguments
1517
+ def get_codeunit_owner_name(self, codeunit_file: str) -> None:
1518
+ namespaces = {'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure',
1519
+ 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
1520
+ root: etree._ElementTree = etree.parse(codeunit_file)
1521
+ result = root.xpath('//cps:codeunit/cps:codeunitownername/text()', namespaces=namespaces)[0]
1522
+ return result
1523
+
1524
+ @GeneralUtilities.check_arguments
1525
+ def get_codeunit_owner_emailaddress(self, codeunit_file: str) -> None:
1526
+ namespaces = {'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure',
1527
+ 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
1528
+ root: etree._ElementTree = etree.parse(codeunit_file)
1529
+ result = root.xpath('//cps:codeunit/cps:codeunitowneremailaddress/text()', namespaces=namespaces)[0]
1530
+ return result
1531
+
1515
1532
  @GeneralUtilities.check_arguments
1516
1533
  def generate_diff_report(self, repository_folder: str, codeunit_name: str, current_version: str) -> None:
1517
1534
  codeunit_folder = os.path.join(repository_folder, codeunit_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ScriptCollection
3
- Version: 3.5.23
3
+ Version: 3.5.24
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
@@ -5,12 +5,12 @@ ScriptCollection/ProgramRunnerBase.py,sha256=7QAjoqOz6XPmJH19F2k-Z1fFQB_uZnPFvn-
5
5
  ScriptCollection/ProgramRunnerEpew.py,sha256=C2Rs3YWOWWWJct7XmKphp5CF1tf0j4Fp-ljV2drLTfs,6349
6
6
  ScriptCollection/ProgramRunnerPopen.py,sha256=G3LgQUVCfaq7XjBsGzalElH31Hbr0etttGR2_H87YzA,3512
7
7
  ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
8
- ScriptCollection/ScriptCollectionCore.py,sha256=vuneqSCSk2_JGarQYnkQaxRoiCVWC4MImq48CQlD3ac,100571
9
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=KHg2a4VmK43t4rvu5co31eCs-erlx7CAyB-__pXnr_Q,192228
8
+ ScriptCollection/ScriptCollectionCore.py,sha256=n3ealK4b0pLWoqRSgdWiFDuSPbG-ZzSAedPqF2cyEOE,100571
9
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=2s_oiUzfcBgKWc33kYphcqDlfdnwpYkn8oCUxKeWmhc,193504
10
10
  ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
11
11
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- ScriptCollection-3.5.23.dist-info/METADATA,sha256=hJ0_J1rkQlKy4E0_dXpH5oqbBlqinQ0zDmtaxdCmMz0,7684
13
- ScriptCollection-3.5.23.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
14
- ScriptCollection-3.5.23.dist-info/entry_points.txt,sha256=yASwR6hWZ_b5d4W49YeX1htD8ngfWbwgjpfQiJdtUAU,2322
15
- ScriptCollection-3.5.23.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
- ScriptCollection-3.5.23.dist-info/RECORD,,
12
+ ScriptCollection-3.5.24.dist-info/METADATA,sha256=CwcFBnSIeqIYzTRMSCzdMS1VQTwzqbP0013R3SPEM-M,7684
13
+ ScriptCollection-3.5.24.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
14
+ ScriptCollection-3.5.24.dist-info/entry_points.txt,sha256=yASwR6hWZ_b5d4W49YeX1htD8ngfWbwgjpfQiJdtUAU,2322
15
+ ScriptCollection-3.5.24.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
+ ScriptCollection-3.5.24.dist-info/RECORD,,