Skip to content

Commit 93d1ba8

Browse files
author
Github Actions
committed
Update README.md to enhance documentation on automatic version calculation and public API detection. Added detailed criteria for version increments based on commit history, including explicit version tags and public API changes, to clarify semantic versioning practices.
1 parent 612a6f7 commit 93d1ba8

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

scripts/README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,32 @@ Commits can include the following tags to control version increments:
9393

9494
### Automatic Version Calculation
9595

96-
The module analyzes commit history to determine appropriate version increments:
96+
The module analyzes commit history to determine appropriate version increments, following semantic versioning principles:
9797

98-
1. Checks for explicit version tags in commit messages
99-
2. Analyzes code changes vs. documentation changes
100-
3. Considers the scope and impact of changes
101-
4. Maintains semantic versioning principles
98+
1. Checks for explicit version tags in commit messages ([major], [minor], [patch], [pre])
99+
2. Detects public API changes by analyzing code diffs
100+
- Adding, modifying, or removing public classes, interfaces, enums, structs, or records
101+
- Changes to public methods, properties, or constants
102+
- Any public API surface change triggers a minor version bump
103+
3. Non-API changing code commits trigger patch version increments
104+
4. Minimal changes default to prerelease increments
105+
106+
This approach ensures that:
107+
- Breaking changes are always major version increments (manually tagged)
108+
- Public API additions or modifications are minor version increments (automatically detected)
109+
- Bug fixes and internal changes are patch version increments
110+
- Trivial changes result in prerelease increments
111+
112+
### Public API Detection
113+
114+
The module automatically analyzes code changes to detect modifications to the public API surface:
115+
116+
- Added, modified, or removed public/protected classes, interfaces, enums, structs, or records
117+
- Added, modified, or removed public/protected methods
118+
- Added, modified, or removed public/protected properties
119+
- Added or removed public constants
120+
121+
When any of these changes are detected, the module automatically triggers a minor version increment, following semantic versioning best practices where non-breaking API changes warrant a minor version bump.
102122

103123
## Build Configuration
104124

0 commit comments

Comments
 (0)