ScriptCollection 4.2.74__py3-none-any.whl → 4.2.76__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.
@@ -390,7 +390,7 @@ def GenerateARC42ReferenceTemplate() -> int:
390
390
  def CreateChangelogEntry() -> int:
391
391
  parser = argparse.ArgumentParser()
392
392
  parser.add_argument('-p', '--repositorypath', required=False, default=".")
393
- parser.add_argument('-m', '--message', required=False, default="Updates.")
393
+ parser.add_argument('-m', '--message', required=False, default=None)
394
394
  parser.add_argument('-c', '--commit', action='store_true', required=False, default=False)
395
395
  parser.add_argument('-f', '--force', action='store_true', required=False, default=False)
396
396
  args = parser.parse_args()
@@ -910,4 +910,4 @@ def SyncXlfFiles()->int:
910
910
  languages=str(args.languages).split(",")
911
911
  folder=GeneralUtilities.resolve_relative_path(args.folder, os.getcwd())
912
912
  sc.sync_xlf2_files(args.prefix, languages, folder)
913
- return 0
913
+ return 0
@@ -37,7 +37,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
37
37
  from .ProgramRunnerPopen import ProgramRunnerPopen
38
38
  from .SCLog import SCLog, LogLevel
39
39
 
40
- version = "4.2.74"
40
+ version = "4.2.76"
41
41
  __version__ = version
42
42
 
43
43
  class VSCodeWorkspaceShellTask:
@@ -650,12 +650,14 @@ class ScriptCollectionCore:
650
650
  # TODO check if this will also be done for submodules
651
651
 
652
652
  @GeneralUtilities.check_arguments
653
- def git_commit(self, directory: str, message: str = "Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0) -> str:
653
+ def git_commit(self, directory: str, message: str = "Saved changes.", author_name: str = None, author_email: str = None, stage_all_changes: bool = True, no_changes_behavior: int = 0,commit_message_body:str=None) -> str:
654
654
  """no_changes_behavior=0 => No commit; no_changes_behavior=1 => Commit anyway; no_changes_behavior=2 => Exception"""
655
655
  self.assert_is_git_repository(directory)
656
656
  author_name = GeneralUtilities.str_none_safe(author_name).strip()
657
657
  author_email = GeneralUtilities.str_none_safe(author_email).strip()
658
658
  argument = ['commit', '--quiet', '--allow-empty', '--message', message]
659
+ if commit_message_body is not None:
660
+ argument.extend(['--message', commit_message_body])
659
661
  if (GeneralUtilities.string_has_content(author_name)):
660
662
  argument.append(f'--author="{author_name} <{author_email}>"')
661
663
  git_repository_has_uncommitted_changes = self.git_repository_has_uncommitted_changes(directory)
@@ -437,9 +437,23 @@ class TFCPS_Tools_General:
437
437
  self.__sc.assert_is_git_repository(repositoryfolder)
438
438
  return self.__sc.get_semver_version_from_gitversion(repositoryfolder)
439
439
 
440
+ @GeneralUtilities.check_arguments
441
+ def __try_calculate_changelog_message(self, repositoryfolder: str):
442
+ self.__sc.assert_is_git_repository(repositoryfolder)
443
+ message = self.__sc.run_program("git", "log -1 --pretty=%B", repositoryfolder)[1]
444
+ message = message.strip()
445
+ if len(message) == 0:
446
+ raise ValueError("No commit message found.")
447
+ return message
448
+
440
449
  @GeneralUtilities.check_arguments
441
450
  def create_changelog_entry(self, repositoryfolder: str, message: str, commit: bool, force: bool):
442
451
  self.__sc.assert_is_git_repository(repositoryfolder)
452
+ if message is None:
453
+ try:
454
+ message=self.__try_calculate_changelog_message(repositoryfolder)
455
+ except:
456
+ message="Update."
443
457
  random_file = os.path.join(repositoryfolder, str(uuid.uuid4()))
444
458
  try:
445
459
  if force and not self.__sc.git_repository_has_uncommitted_changes(repositoryfolder):
@@ -1548,4 +1562,4 @@ class TFCPS_Tools_General:
1548
1562
 
1549
1563
 
1550
1564
  def update_dependent_oci_images(self,repo:str):
1551
- pass#TODO update all image-tags in repo/.ScriptCollection/OCIImages/ImageDefinition.csv if possible using the custom defined registries in ~/.ScriptCollection if possible.
1565
+ pass#TODO update all image-tags in repo/.ScriptCollection/OCIImages/ImageDefinition.csv if possible using the custom defined registries in ~/.ScriptCollection if possible.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 4.2.74
3
+ Version: 4.2.76
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
@@ -1,6 +1,6 @@
1
1
  ScriptCollection/AnionBuildPlatform.py,sha256=K-PHarX802A0PU8uRu0GNcEZiXujFoXHACe-X9YJsAQ,11711
2
2
  ScriptCollection/CertificateUpdater.py,sha256=Pa6eyjQSx7IIvj4PQVMI0IwMs01KQrNSB7Qa-7lRfBs,9375
3
- ScriptCollection/Executables.py,sha256=SsA3zeDL8QEsh7GxjDjatv5P4eFeDBPqB0F8pNXoYzA,44234
3
+ ScriptCollection/Executables.py,sha256=Y1nzSLWjU7wQxh7BR8RKQM51pauhIeXJawC6SM5uWcw,44229
4
4
  ScriptCollection/GeneralUtilities.py,sha256=3Fgp0fAXF-rfcohy6k1RsRcMXEVRF15fHl8QJnViKIg,65497
5
5
  ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
6
6
  ScriptCollection/ProcessesRunner.py,sha256=o5raxIt3lknNPoPrjNzJ2bprRPJ3SnL0rrR7crraD7E,1523
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
9
9
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
10
10
  ScriptCollection/ProgramRunnerSudo.py,sha256=_khC3xuTdrPoLluBJZWfldltmmuKltABJPcbjZSFW-4,4835
11
11
  ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
12
- ScriptCollection/ScriptCollectionCore.py,sha256=5RXTdMUUCb1XvzPEj8JTqQosPQ4YgRufsbXpY6ZEHa8,181964
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=o_TAAlf3mBwzpMMZGly6tPi0jQFqA1hy9hHWxTRC-po,182101
13
13
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=83qDMILwxhH9DbC0sb358Vu8PXEysmJJyap_6gECZqs,1627
15
15
  ScriptCollection/OCIImages/OCIImageManager.py,sha256=aBogkSXNDyi8NO11N-s03nuFJEv7PyJ-wjHuYYeZfvs,6662
@@ -30,7 +30,7 @@ ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=Tpzgiz6m3-cYCkObZOG5Uu7oM-EMoWFzz
30
30
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=-Ev9D3bZDlUk2WFQhcmvzQ3FCS97OdsVUd0koAdmpZc,7474
31
31
  ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=Ajfy2pLajTuU6UpwItHt4C2a-gLF3gPc4z6BktL3Cio,22163
32
32
  ScriptCollection/TFCPS/TFCPS_PreBuildCodeunitsScript.py,sha256=f0Uq1cA_4LvmL72cal0crrbKF6PcxL13D9wBKuQ1YBw,2328
33
- ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=H8qve4dwY6XjLAKrh8jAJohk8DGdtnqa_-frkrME8pU,100769
33
+ ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=VbS3qdpCc4ZgbwlwxHdLB_ras8dDmJDBklRrWIrhbDQ,101356
34
34
  ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=sPO4Gf6oRbGH9QRA3p2nmTAeHtkyYr31ucLbJP09JeY,12139
36
36
  ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -47,8 +47,8 @@ ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=GQLE6FeR-X
47
47
  ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=9XK7XnbeOnq_4siVoWovogStoKFiZLhGh3C_f2YaznI,13621
49
49
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- scriptcollection-4.2.74.dist-info/METADATA,sha256=X82BuSGCRx0eK2pnFKs2wEhh7_xViAovRmeiZpqitfc,7691
51
- scriptcollection-4.2.74.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
52
- scriptcollection-4.2.74.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
53
- scriptcollection-4.2.74.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
54
- scriptcollection-4.2.74.dist-info/RECORD,,
50
+ scriptcollection-4.2.76.dist-info/METADATA,sha256=ssdr0yn_g2LJd7XN-POY7xS0IFzHqBKwpQG5hgaXFeo,7691
51
+ scriptcollection-4.2.76.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
52
+ scriptcollection-4.2.76.dist-info/entry_points.txt,sha256=27XwAJEcaMEc1be0Ec1vKHCbiU4Ziu8jKL-SqsrYOIQ,4680
53
+ scriptcollection-4.2.76.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
54
+ scriptcollection-4.2.76.dist-info/RECORD,,