tag-publish 1.3.0.dev8__tar.gz → 1.3.0.dev13__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.
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tag-publish
3
- Version: 1.3.0.dev8
3
+ Version: 1.3.0.dev13
4
4
  Summary: Tools used to publish Python packages, Docker images and Helm charts for GitHub tag and branch
5
5
  License: FreeBSD
6
6
  License-File: LICENSE
7
7
  Keywords: ci
8
8
  Author: Camptocamp
9
9
  Author-email: info@camptocamp.com
10
- Requires-Python: >=3.10
10
+ Requires-Python: >=3.11
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Developers
@@ -15,7 +15,6 @@ Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
@@ -1,6 +1,6 @@
1
1
  [tool.ruff]
2
2
  line-length = 110
3
- target-version = "py310"
3
+ target-version = "py311"
4
4
 
5
5
  [tool.ruff.lint]
6
6
  select = []
@@ -20,7 +20,7 @@ convention = "numpy"
20
20
  exclude = ["tag_publish/node_modules/**/test"]
21
21
 
22
22
  [tool.poetry.dependencies]
23
- python = ">=3.10,<4.0"
23
+ python = ">=3.11,<4.0"
24
24
  PyYAML = "6.0.3"
25
25
  security-md = "1.0.0"
26
26
  githubkit = "0.14.3"
@@ -77,7 +77,6 @@ classifiers = [
77
77
  'Operating System :: OS Independent',
78
78
  'Programming Language :: Python',
79
79
  'Programming Language :: Python :: 3',
80
- 'Programming Language :: Python :: 3.10',
81
80
  'Programming Language :: Python :: 3.11',
82
81
  'Programming Language :: Python :: 3.12',
83
82
  'Programming Language :: Python :: 3.13',
@@ -95,9 +94,9 @@ include = [
95
94
  "tag_publish/py.typed",
96
95
  "tag_publish/*.json",
97
96
  ]
98
- requires-python = ">=3.10"
97
+ requires-python = ">=3.11"
99
98
  dependencies = ["PyYAML<7,>=6", "security-md<2,>=1", "githubkit<1,>=0"]
100
- version = "1.3.0.dev8"
99
+ version = "1.3.0.dev13"
101
100
 
102
101
  [project.optional-dependencies]
103
102
  pypi = ["requests<3,>=2", "twine<7,>=6", "id<2,>=1"]
@@ -6,9 +6,9 @@ import os
6
6
  import re
7
7
  import subprocess # nosec
8
8
  import sys
9
+ import tomllib
9
10
  from pathlib import Path
10
11
 
11
- import tomllib
12
12
  import yaml
13
13
 
14
14
  import tag_publish
@@ -50,7 +50,7 @@ def pip(
50
50
  if (cwd / "setup.py").exists():
51
51
  cmd = ["python3", "./setup.py", "egg_info", "--no-date"]
52
52
  cmd += (
53
- ["--tag-build=dev" + datetime.datetime.now(tz=datetime.timezone.utc).strftime("%Y%m%d%H%M%S")]
53
+ ["--tag-build=dev" + datetime.datetime.now(tz=datetime.UTC).strftime("%Y%m%d%H%M%S")]
54
54
  if version_type in ("default_branch", "stabilization_branch", "rebuild")
55
55
  else []
56
56
  )
@@ -294,23 +294,11 @@ def helm(
294
294
  try:
295
295
  chart_path = Path(folder) / "Chart.yaml"
296
296
  with chart_path.open(encoding="utf-8") as open_file:
297
- chart_content = open_file.read()
298
- chart = yaml.load(chart_content, Loader=yaml.SafeLoader)
297
+ chart = yaml.load(open_file, Loader=yaml.SafeLoader)
299
298
  chart_name = chart.get("name", "")
300
- # The version is updated with a targeted replacement to preserve the file formatting and comments
301
- new_chart_content, number_of_substitutions = re.subn(
302
- r"^version:.*$",
303
- f"version: {version}",
304
- chart_content,
305
- count=1,
306
- flags=re.MULTILINE,
307
- )
308
- if number_of_substitutions != 1:
309
- print("::endgroup::")
310
- print(f"::error::Unable to find the 'version' key in '{chart_path}'")
311
- return False
299
+ chart["version"] = version
312
300
  with chart_path.open("w", encoding="utf-8") as open_file:
313
- open_file.write(new_chart_content)
301
+ yaml.dump(chart, open_file, sort_keys=False)
314
302
  for index, dependency in enumerate(chart.get("dependencies", [])):
315
303
  if dependency["repository"].startswith("https://"):
316
304
  subprocess.run(["helm", "repo", "add", str(index), dependency["repository"]], check=True)