current-cli 0.1.7__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.7
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
@@ -2450,6 +2450,9 @@ components:
2450
2450
  company:
2451
2451
  type: string
2452
2452
  maxLength: 255
2453
+ role:
2454
+ type: string
2455
+ maxLength: 255
2453
2456
  membership:
2454
2457
  type: string
2455
2458
  format: uuid
@@ -2554,6 +2557,9 @@ components:
2554
2557
  company:
2555
2558
  type: string
2556
2559
  maxLength: 255
2560
+ role:
2561
+ type: string
2562
+ maxLength: 255
2557
2563
  required:
2558
2564
  - name
2559
2565
  - workspace
@@ -2908,6 +2914,9 @@ components:
2908
2914
  company:
2909
2915
  type: string
2910
2916
  maxLength: 255
2917
+ role:
2918
+ type: string
2919
+ maxLength: 255
2911
2920
  PatchedProjectFieldDefinitionRequest:
2912
2921
  type: object
2913
2922
  properties:
@@ -3013,6 +3022,8 @@ components:
3013
3022
  trigger:
3014
3023
  $ref: '#/components/schemas/TriggerEnum'
3015
3024
  trigger_config: {}
3025
+ match_description:
3026
+ type: string
3016
3027
  approval_config: {}
3017
3028
  definition:
3018
3029
  type: string
@@ -3767,6 +3778,8 @@ components:
3767
3778
  trigger:
3768
3779
  $ref: '#/components/schemas/TriggerEnum'
3769
3780
  trigger_config: {}
3781
+ match_description:
3782
+ type: string
3770
3783
  approval_config: {}
3771
3784
  definition:
3772
3785
  type: string
@@ -3850,6 +3863,8 @@ components:
3850
3863
  trigger:
3851
3864
  $ref: '#/components/schemas/TriggerEnum'
3852
3865
  trigger_config: {}
3866
+ match_description:
3867
+ type: string
3853
3868
  approval_config: {}
3854
3869
  definition:
3855
3870
  type: string
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "current-cli"
3
- version = "0.1.7"
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