You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d5405f
Browse filesBrowse the repository at this point in the historyBrowse files
Enhance version resolution process with repository support
This update introduces optional parameters for specifying the target repository and its URL in the version resolution function. The README is also updated to clarify the version detection process, including querying PyPI, TestPyPI, and Azure Artifacts for the latest published version. This enhancement improves the flexibility of version management and ensures accurate version calculations based on the actual published state of packages.
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -455,8 +455,15 @@ The `--version` option:
455
455
456
456
When `--version` is not provided, the tool can automatically determine the next version using semantic-release. This requires Node.js, npm, and semantic-release to be installed.
457
457
458
+
**Version Detection:**
459
+
-**Baseline version**:
460
+
-**Registry Query (Preferred)**: When publishing to a repository (PyPI, TestPyPI, or Azure Artifacts), the tool queries the target registry for the latest published version and uses it as the baseline for version calculation. This ensures version calculations are based on what's actually published, not just git tags.
461
+
-**Git Tags (Fallback)**: If the package doesn't exist on the registry yet (first release) or if registry query fails, the tool falls back to using git tags to determine the starting version.
462
+
-**New version to publish**: After determining the baseline version, [`semantic-release`](https://semantic-release.gitbook.io/semantic-release/) analyzes commits since that version to calculate the next version bump (major, minor, or patch) based on [_conventional commit_](https://www.conventionalcommits.org/en/v1.0.0/) messages.
- Queries the target registry for the latest published version of the subfolder package
460
467
- Filters commits to only those affecting the subfolder path
461
468
-**Commit filtering behavior**: Only commits that modify files within the subfolder path are considered for version calculation. Commits that only target files outside the subfolder are excluded. For example:
- Queries the target registry for the latest published version when publishing
469
477
- Analyzes all commits in the repository
470
478
479
+
**Registry Support:**
480
+
-**PyPI**: Fully supported via JSON API (`https://pypi.org/pypi/{package-name}/json`)
481
+
-**TestPyPI**: Fully supported via JSON API (`https://test.pypi.org/pypi/{package-name}/json`)
482
+
-**Azure Artifacts**: Basic support with fallback to git tags. Azure Artifacts uses a different API format and may require authentication, so if the query fails, the tool automatically falls back to git tags.
0 commit comments