@metalagman/semverctl-linux-arm64 0.0.8 โ†’ 0.0.11

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.
Files changed (3) hide show
  1. package/README.md +86 -30
  2. package/bin/semverctl +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,15 +9,18 @@
9
9
  [![PyPI](https://img.shields.io/pypi/v/semverctl)](https://pypi.org/project/semverctl/)
10
10
  [![license](https://img.shields.io/github/license/metalagman/semverctl)](LICENSE)
11
11
 
12
- CLI for bumping and setting SemVer values in JSON/YAML files
12
+ CLI for bumping and setting SemVer values in JSON/YAML files and Git tags
13
13
 
14
14
  ## Features
15
15
 
16
16
  - โœจ **Semantic Versioning** - Strict SemVer 2.0.0 compliance with prerelease and build metadata support
17
- - ๐Ÿ“ **Multiple Formats** - JSON and YAML file support
17
+ - ๐Ÿ“ **File + Tag Workflows** - Explicit `bump/set file` and `bump/set tag` commands
18
+ - ๐Ÿท๏ธ **Git Tag Releases** - Bump from latest stable `vX.Y.Z` tag or set explicit tags
18
19
  - ๐ŸŽฏ **Path Navigation** - Dot-notation paths for nested version fields (e.g., `.app.version`)
19
20
  - ๐Ÿ”ข **Numeric Bumping** - Bump individual numeric fields for object-style versions
20
21
  - ๐Ÿงช **Dry-Run Mode** - Preview changes with unified diff output
22
+ - ๐Ÿค– **Automation-Friendly JSON** - `--json` output for machine-readable success/error payloads
23
+ - ๐Ÿ”’ **Safety Checks** - Tag operations require a clean repository state
21
24
  - ๐ŸŒ **Cross-Platform** - Linux, macOS, and Windows support (CGO-free)
22
25
  - โšก **Zero Dependencies** - Pure Go implementation with no runtime dependencies
23
26
  - ๐Ÿ“ฆ **Multiple Distribution Channels** - Go install, npm, uv/PyPI, and GitHub Releases
@@ -67,45 +70,84 @@ sha256sum -c checksums.txt
67
70
 
68
71
  ## Usage
69
72
 
70
- ### Bump Version
73
+ ### Bump File Version
71
74
 
72
- Bump the semantic version at the specified path in JSON or YAML files:
75
+ Bump the semantic version in a specific JSON or YAML file:
73
76
 
74
77
  ```bash
75
- # Bump patch version in package.json (default target)
76
- semverctl bump
78
+ # Bump patch in a file
79
+ semverctl bump file package.json
77
80
 
78
- # Bump specific version component in package.json
79
- semverctl bump --minor
80
- semverctl bump --major
81
- semverctl bump --patch
81
+ # Bump specific version component
82
+ semverctl bump file package.json --minor
83
+ semverctl bump file package.json --major
82
84
 
83
- # Bump version in a specific file at a custom path
84
- semverctl bump --file config.yaml --path .app.version
85
+ # Bump version at a custom path
86
+ semverctl bump file config.yaml --path .app.version
85
87
 
86
- # Bump all matching files in current directory tree
87
- semverctl bump --glob "**/*.json"
88
+ # Preview changes without modifying the file
89
+ semverctl bump file package.json --dry-run
88
90
 
89
- # Preview changes without modifying files
90
- semverctl bump --dry-run
91
+ # Machine-readable output for automation
92
+ semverctl bump file package.json --dry-run --json
91
93
  ```
92
94
 
93
- ### Set Version
95
+ ### Set File Version
94
96
 
95
- Set an explicit version value:
97
+ Set an explicit version value in a specific file:
96
98
 
97
99
  ```bash
98
- # Set version to 1.2.3 in package.json (default target)
99
- semverctl set 1.2.3
100
+ # Set version to 1.2.3 in a file
101
+ semverctl set file 1.2.3 package.json
100
102
 
101
- # Set version in a specific file at a custom path
102
- semverctl set 2.0.0 --file config.yaml --path .app.version
103
-
104
- # Set version in all matching files under current directory
105
- semverctl set 2.0.0 --glob "**/*.json"
103
+ # Set version at a custom path
104
+ semverctl set file 2.0.0 config.yaml --path .app.version
106
105
 
107
106
  # Preview changes
108
- semverctl set 1.0.0 --dry-run
107
+ semverctl set file 1.0.0 package.json --dry-run
108
+
109
+ # Machine-readable output for automation
110
+ semverctl set file 1.2.3 package.json --json
111
+ ```
112
+
113
+ ### Bump Tag
114
+
115
+ Bump from the latest stable git tag (`vX.Y.Z`) and create a new annotated tag:
116
+
117
+ ```bash
118
+ # Create next patch tag
119
+ semverctl bump tag
120
+
121
+ # Create next minor tag
122
+ semverctl bump tag --minor
123
+
124
+ # Preview tag creation
125
+ semverctl bump tag --dry-run
126
+
127
+ # Create and push tag to origin
128
+ semverctl bump tag --push
129
+
130
+ # Machine-readable output for automation
131
+ semverctl bump tag --dry-run --json
132
+ ```
133
+
134
+ ### Set Tag
135
+
136
+ Create an explicit annotated git tag:
137
+
138
+ ```bash
139
+ # Accepts 1.2.3 or v1.2.3
140
+ semverctl set tag 1.2.3
141
+ semverctl set tag v2.0.0
142
+
143
+ # Preview tag creation
144
+ semverctl set tag 2.1.0 --dry-run
145
+
146
+ # Create and push tag to origin
147
+ semverctl set tag 2.1.0 --push
148
+
149
+ # Machine-readable output for automation
150
+ semverctl set tag 2.1.0 --json
109
151
  ```
110
152
 
111
153
  ### Numeric Bump
@@ -114,7 +156,7 @@ For object-style version fields (e.g., `{ "Major": 1, "Minor": 2, "Patch": 3 }`)
114
156
  you can bump numeric scalar values:
115
157
 
116
158
  ```bash
117
- semverctl bump --numeric --path .version.Patch --file config.json
159
+ semverctl bump file config.json --numeric --path .version.Patch
118
160
  ```
119
161
 
120
162
  This increments the numeric value at the specified path by 1.
@@ -147,13 +189,27 @@ semverctl follows the [Semantic Versioning 2.0.0](https://semver.org/) specifica
147
189
 
148
190
  ## Dry-Run Mode
149
191
 
150
- Use `--dry-run` to preview changes without modifying files:
192
+ Use `--dry-run` to preview file changes or tag actions without mutation:
193
+
194
+ ```bash
195
+ semverctl bump file package.json --dry-run
196
+ semverctl bump tag --dry-run
197
+ ```
198
+
199
+ For file commands, this outputs a unified diff showing what would change.
200
+
201
+ ## JSON Output
202
+
203
+ Use `--json` for machine-readable automation output:
151
204
 
152
205
  ```bash
153
- semverctl bump --dry-run package.json
206
+ semverctl bump tag --dry-run --json
207
+ semverctl set tag 1.2.3 --json
208
+ semverctl bump file package.json --dry-run --json
154
209
  ```
155
210
 
156
- This outputs a unified diff showing what would change.
211
+ When `--json` is enabled, both success and failure responses are printed as JSON to stdout.
212
+ Failures still return a non-zero exit code.
157
213
 
158
214
  ## Exit Codes
159
215
 
package/bin/semverctl CHANGED
Binary file
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "os": [
17
17
  "linux"
18
18
  ],
19
- "version": "0.0.8"
19
+ "version": "0.0.11"
20
20
  }