gha-utils 4.15.0__tar.gz → 4.15.2__tar.gz

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.

Potentially problematic release.


This version of gha-utils might be problematic. Click here for more details.

Files changed (23) hide show
  1. {gha_utils-4.15.0 → gha_utils-4.15.2}/PKG-INFO +1 -1
  2. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/__init__.py +1 -1
  3. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/cli.py +0 -2
  4. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/metadata.py +8 -1
  5. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/test_plan.py +10 -5
  6. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/PKG-INFO +1 -1
  7. {gha_utils-4.15.0 → gha_utils-4.15.2}/pyproject.toml +2 -2
  8. {gha_utils-4.15.0 → gha_utils-4.15.2}/tests/test_metadata.py +14 -4
  9. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/__main__.py +0 -0
  10. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/changelog.py +0 -0
  11. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/mailmap.py +0 -0
  12. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/matrix.py +0 -0
  13. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils/py.typed +0 -0
  14. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/SOURCES.txt +0 -0
  15. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/dependency_links.txt +0 -0
  16. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/entry_points.txt +0 -0
  17. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/requires.txt +0 -0
  18. {gha_utils-4.15.0 → gha_utils-4.15.2}/gha_utils.egg-info/top_level.txt +0 -0
  19. {gha_utils-4.15.0 → gha_utils-4.15.2}/readme.md +0 -0
  20. {gha_utils-4.15.0 → gha_utils-4.15.2}/setup.cfg +0 -0
  21. {gha_utils-4.15.0 → gha_utils-4.15.2}/tests/test_changelog.py +0 -0
  22. {gha_utils-4.15.0 → gha_utils-4.15.2}/tests/test_mailmap.py +0 -0
  23. {gha_utils-4.15.0 → gha_utils-4.15.2}/tests/test_matrix.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gha-utils
3
- Version: 4.15.0
3
+ Version: 4.15.2
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.15.0"
20
+ __version__ = "4.15.2"
@@ -286,8 +286,6 @@ def mailmap_sync(ctx, source, create_if_missing, destination_mailmap):
286
286
  @option(
287
287
  "-F",
288
288
  "--plan-file",
289
- # TODO: remove deprecated --plan option to avoid confusion.
290
- "--plan",
291
289
  type=file_path(exists=True, readable=True, resolve_path=True),
292
290
  multiple=True,
293
291
  metavar="FILE_PATH",
@@ -796,13 +796,20 @@ class Metadata:
796
796
  def current_version(self) -> str | None:
797
797
  """Returns the current version.
798
798
 
799
- I.e. the version of the most recent commit.
799
+ Current version is fetched from the ``bump-my-version`` configuration file.
800
+
801
+ During a release we get two commits bundled into a single event. The first one
802
+ is the release commit itself freezing the version to the release number. The
803
+ second one is the commit that bumps the version to the next one. In this situation,
804
+ the current version returned is the one from the most recent commit.
800
805
  """
801
806
  version = None
802
807
  if self.new_commits_matrix:
803
808
  details = self.new_commits_matrix.get("include")
804
809
  if details:
805
810
  version = details[0].get("current_version")
811
+ else:
812
+ version = self.get_current_version()
806
813
  return version
807
814
 
808
815
  @cached_property
@@ -96,11 +96,16 @@ class CLITestCase:
96
96
  if isinstance(field_data, str) or not isinstance(
97
97
  field_data, Sequence
98
98
  ):
99
- # CLI parameters needs to be split on Unix-like systems.
100
- # XXX If we need the same for Windows, have a look at:
101
- # https://github.com/maxpat78/w32lex
102
- if field_id == "cli_parameters" and sys.platform != "win32":
103
- field_data = tuple(shlex.split(field_data))
99
+ # CLI parameters provided as a long string needs to be split so
100
+ # that each argument is a separate item in the final tuple.
101
+ if field_id == "cli_parameters":
102
+ # XXX Maybe we should rely on a library to parse them:
103
+ # https://github.com/maxpat78/w32lex
104
+ if sys.platform == "win32":
105
+ field_data = field_data.split()
106
+ # For Unix platforms, we have the dedicated shlex module.
107
+ else:
108
+ field_data = shlex.split(field_data)
104
109
  else:
105
110
  field_data = (field_data,)
106
111
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gha-utils
3
- Version: 4.15.0
3
+ Version: 4.15.2
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  # Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
3
3
  name = "gha-utils"
4
- version = "4.15.0"
4
+ version = "4.15.2"
5
5
  # Python versions and their status: https://devguide.python.org/versions/
6
6
  requires-python = ">= 3.11"
7
7
  description = "⚙️ CLI helpers for GitHub Actions + reuseable workflows"
@@ -136,7 +136,7 @@ addopts = [
136
136
  xfail_strict = true
137
137
 
138
138
  [tool.bumpversion]
139
- current_version = "4.15.0"
139
+ current_version = "4.15.2"
140
140
  allow_dirty = true
141
141
  ignore_missing_files = true
142
142
 
@@ -36,11 +36,16 @@ def test_metadata_github_format():
36
36
  r"blacken_docs_params=--target-version py311 "
37
37
  r"--target-version py312 --target-version py313\n"
38
38
  r"mypy_params=--python-version 3\.11\n"
39
- r"current_version=\n"
39
+ r"current_version=[0-9\.]+\n"
40
40
  r"released_version=\n"
41
41
  r"is_sphinx=false\n"
42
42
  r"active_autodoc=false\n"
43
- r"release_notes=\n"
43
+ r"release_notes<<ghadelimiter_[0-9]+\n"
44
+ r"### Changes\n\n"
45
+ r"> \[\!IMPORTANT\]\n"
46
+ r"> This version is not released yet and is under active development.\n\n"
47
+ r".+\n"
48
+ r"ghadelimiter_[0-9]+\n"
44
49
  r"new_commits_matrix=\n"
45
50
  r"release_commits_matrix=\n"
46
51
  r'nuitka_matrix=\{"os": \["ubuntu-24\.04", "ubuntu-24\.04-arm", '
@@ -76,6 +81,7 @@ def test_metadata_github_format():
76
81
  r'"bin_name": "gha-utils-windows-x64-build-[a-z0-9]+\.exe"\}\]\}\n'
77
82
  ),
78
83
  metadata.dump(Dialects.github),
84
+ re.DOTALL,
79
85
  )
80
86
 
81
87
 
@@ -97,11 +103,14 @@ def test_metadata_plain_format():
97
103
  r"'--target-version py312', "
98
104
  r"'--target-version py313'\), "
99
105
  r"'mypy_params': '--python-version 3\.11', "
100
- r"'current_version': None, "
106
+ r"'current_version': '[0-9\.]+', "
101
107
  r"'released_version': None, "
102
108
  r"'is_sphinx': False, "
103
109
  r"'active_autodoc': False, "
104
- r"'release_notes': None, "
110
+ r"'release_notes': '### Changes\\n\\n"
111
+ r"> \[\!IMPORTANT\]\\n"
112
+ r"> This version is not released yet and is under active development.\\n\\n"
113
+ r".+', "
105
114
  r"'new_commits_matrix': None, "
106
115
  r"'release_commits_matrix': None, "
107
116
  r"'nuitka_matrix': <Matrix: \{"
@@ -139,4 +148,5 @@ def test_metadata_plain_format():
139
148
  r"exclude=\(\)>\}"
140
149
  ),
141
150
  metadata.dump(Dialects.plain),
151
+ re.DOTALL,
142
152
  )
File without changes
File without changes