Skip to content

Commit e1d5905

Browse files
maycotteclaude
andcommitted
feat: add edgit tag bump command for semver automation
Adds a new subcommand to automatically bump semantic versions: - `edgit tag bump <component> <major|minor|patch|prerelease>` - Finds latest version tag and creates incremented version - Supports --ref flag for specifying target Git ref - Handles components with no existing tags (starts at v0.0.1) - Full prerelease support (v1.0.0-alpha.1 → v1.0.0-alpha.2) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7138196 commit e1d5905

File tree

10 files changed

+357
-8
lines changed

10 files changed

+357
-8
lines changed

.changeset/add-tag-bump-command.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@ensemble-edge/edgit": patch
3+
---
4+
5+
Add `edgit tag bump` command for automated semantic version bumping
6+
7+
- New `edgit tag bump <component> <major|minor|patch|prerelease>` command
8+
- Automatically finds the latest version tag and creates a bumped version
9+
- Supports optional `--ref <ref>` to specify the Git ref for the new tag
10+
- Handles edge cases: components with no existing tags start at v0.0.1
11+
- Full semver support including prerelease increments (v1.0.0-alpha.1 → v1.0.0-alpha.2)

dist/commands/tag.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ export declare class TagCommand extends Command {
3030
private listAllComponentTags;
3131
private getComponentTagData;
3232
private listComponentTags;
33+
/**
34+
* Bump version tag for a component
35+
* Finds latest version and increments based on bump type
36+
*/
37+
private bumpTag;
38+
/**
39+
* Bump a semver version string
40+
*/
41+
private bumpVersion;
42+
/**
43+
* Compare two semver versions
44+
* Returns negative if a < b, positive if a > b, 0 if equal
45+
*/
46+
private compareSemver;
3347
private loadRegistry;
3448
getHelp(): string;
3549
private showHelp;

dist/commands/tag.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commands/tag.js

Lines changed: 145 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)