current-cli 0.1.8__tar.gz → 0.1.9__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: current-cli
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Command line interface for the Current API, generated from its OpenAPI schema at runtime
5
5
  Author-email: Orin <your-email@example.com>
6
6
  License-Expression: MIT
@@ -3022,6 +3022,8 @@ components:
3022
3022
  trigger:
3023
3023
  $ref: '#/components/schemas/TriggerEnum'
3024
3024
  trigger_config: {}
3025
+ match_description:
3026
+ type: string
3025
3027
  approval_config: {}
3026
3028
  definition:
3027
3029
  type: string
@@ -3776,6 +3778,8 @@ components:
3776
3778
  trigger:
3777
3779
  $ref: '#/components/schemas/TriggerEnum'
3778
3780
  trigger_config: {}
3781
+ match_description:
3782
+ type: string
3779
3783
  approval_config: {}
3780
3784
  definition:
3781
3785
  type: string
@@ -3859,6 +3863,8 @@ components:
3859
3863
  trigger:
3860
3864
  $ref: '#/components/schemas/TriggerEnum'
3861
3865
  trigger_config: {}
3866
+ match_description:
3867
+ type: string
3862
3868
  approval_config: {}
3863
3869
  definition:
3864
3870
  type: string
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "current-cli"
3
- version = "0.1.8"
3
+ version = "0.1.9"
4
4
  description = "Command line interface for the Current API, generated from its OpenAPI schema at runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -22,6 +22,10 @@ def bump(path: Path, from_version: str | None = None) -> str:
22
22
  text = path.read_text()
23
23
  new_text = text.replace(f'version = "{current}"', f'version = "{new_version}"', 1)
24
24
  if new_text == text:
25
+ # The file already holds the bumped version (an auto-bump commit
26
+ # landed after the base release): a no-op, not an error.
27
+ if current == new_version:
28
+ return new_version
25
29
  raise SystemExit(f'could not find version = "{current}" in {path}')
26
30
  path.write_text(new_text)
27
31
  return new_version
@@ -34,9 +34,23 @@ def test_bump_patch_of_file_version(tmp_path):
34
34
 
35
35
 
36
36
  def test_bump_patch_of_pypi_version(tmp_path):
37
- """CI passes the latest PyPI version; the file version is replaced with its successor."""
37
+ """CI passes the latest PyPI version; the file version is replaced with its
38
+ successor. Synthetic content: the committed version moves with every
39
+ auto-bump, so copying the real file would tie the test to a release."""
38
40
  target = tmp_path / "pyproject.toml"
39
- target.write_text(PYPROJECT.read_text())
41
+ target.write_text('[project]\nname = "current-cli"\nversion = "0.1.6"\n')
42
+
43
+ printed = run_script(str(target), "0.1.7")
44
+
45
+ assert printed == "0.1.8"
46
+ assert tomllib.loads(target.read_text())["project"]["version"] == "0.1.8"
47
+
48
+
49
+ def test_bump_is_noop_when_file_already_holds_target(tmp_path):
50
+ """An auto-bump commit can land the target version before the publish
51
+ run; bumping to the version already in the file is a no-op, not an error."""
52
+ target = tmp_path / "pyproject.toml"
53
+ target.write_text('[project]\nname = "current-cli"\nversion = "0.1.8"\n')
40
54
 
41
55
  printed = run_script(str(target), "0.1.7")
42
56
 
File without changes
File without changes
File without changes