@metalagman/semverctl-linux-arm64 0.0.8 → 0.0.10
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.
- package/README.md +81 -28
- package/bin/semverctl +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,45 +67,84 @@ sha256sum -c checksums.txt
|
|
|
67
67
|
|
|
68
68
|
## Usage
|
|
69
69
|
|
|
70
|
-
### Bump Version
|
|
70
|
+
### Bump File Version
|
|
71
71
|
|
|
72
|
-
Bump the semantic version
|
|
72
|
+
Bump the semantic version in a specific JSON or YAML file:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
# Bump patch
|
|
76
|
-
semverctl bump
|
|
75
|
+
# Bump patch in a file
|
|
76
|
+
semverctl bump file package.json
|
|
77
77
|
|
|
78
|
-
# Bump specific version component
|
|
79
|
-
semverctl bump --minor
|
|
80
|
-
semverctl bump --major
|
|
81
|
-
semverctl bump --patch
|
|
78
|
+
# Bump specific version component
|
|
79
|
+
semverctl bump file package.json --minor
|
|
80
|
+
semverctl bump file package.json --major
|
|
82
81
|
|
|
83
|
-
# Bump version
|
|
84
|
-
semverctl bump
|
|
82
|
+
# Bump version at a custom path
|
|
83
|
+
semverctl bump file config.yaml --path .app.version
|
|
85
84
|
|
|
86
|
-
#
|
|
87
|
-
semverctl bump
|
|
85
|
+
# Preview changes without modifying the file
|
|
86
|
+
semverctl bump file package.json --dry-run
|
|
88
87
|
|
|
89
|
-
#
|
|
90
|
-
semverctl bump --dry-run
|
|
88
|
+
# Machine-readable output for automation
|
|
89
|
+
semverctl bump file package.json --dry-run --json
|
|
91
90
|
```
|
|
92
91
|
|
|
93
|
-
### Set Version
|
|
92
|
+
### Set File Version
|
|
94
93
|
|
|
95
|
-
Set an explicit version value:
|
|
94
|
+
Set an explicit version value in a specific file:
|
|
96
95
|
|
|
97
96
|
```bash
|
|
98
|
-
# Set version to 1.2.3 in
|
|
99
|
-
semverctl set 1.2.3
|
|
97
|
+
# Set version to 1.2.3 in a file
|
|
98
|
+
semverctl set file 1.2.3 package.json
|
|
100
99
|
|
|
101
|
-
# Set version
|
|
102
|
-
semverctl set 2.0.0
|
|
103
|
-
|
|
104
|
-
# Set version in all matching files under current directory
|
|
105
|
-
semverctl set 2.0.0 --glob "**/*.json"
|
|
100
|
+
# Set version at a custom path
|
|
101
|
+
semverctl set file 2.0.0 config.yaml --path .app.version
|
|
106
102
|
|
|
107
103
|
# Preview changes
|
|
108
|
-
semverctl set 1.0.0 --dry-run
|
|
104
|
+
semverctl set file 1.0.0 package.json --dry-run
|
|
105
|
+
|
|
106
|
+
# Machine-readable output for automation
|
|
107
|
+
semverctl set file 1.2.3 package.json --json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Bump Tag
|
|
111
|
+
|
|
112
|
+
Bump from the latest stable git tag (`vX.Y.Z`) and create a new annotated tag:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Create next patch tag
|
|
116
|
+
semverctl bump tag
|
|
117
|
+
|
|
118
|
+
# Create next minor tag
|
|
119
|
+
semverctl bump tag --minor
|
|
120
|
+
|
|
121
|
+
# Preview tag creation
|
|
122
|
+
semverctl bump tag --dry-run
|
|
123
|
+
|
|
124
|
+
# Create and push tag to origin
|
|
125
|
+
semverctl bump tag --push
|
|
126
|
+
|
|
127
|
+
# Machine-readable output for automation
|
|
128
|
+
semverctl bump tag --dry-run --json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Set Tag
|
|
132
|
+
|
|
133
|
+
Create an explicit annotated git tag:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Accepts 1.2.3 or v1.2.3
|
|
137
|
+
semverctl set tag 1.2.3
|
|
138
|
+
semverctl set tag v2.0.0
|
|
139
|
+
|
|
140
|
+
# Preview tag creation
|
|
141
|
+
semverctl set tag 2.1.0 --dry-run
|
|
142
|
+
|
|
143
|
+
# Create and push tag to origin
|
|
144
|
+
semverctl set tag 2.1.0 --push
|
|
145
|
+
|
|
146
|
+
# Machine-readable output for automation
|
|
147
|
+
semverctl set tag 2.1.0 --json
|
|
109
148
|
```
|
|
110
149
|
|
|
111
150
|
### Numeric Bump
|
|
@@ -114,7 +153,7 @@ For object-style version fields (e.g., `{ "Major": 1, "Minor": 2, "Patch": 3 }`)
|
|
|
114
153
|
you can bump numeric scalar values:
|
|
115
154
|
|
|
116
155
|
```bash
|
|
117
|
-
semverctl bump --numeric --path .version.Patch
|
|
156
|
+
semverctl bump file config.json --numeric --path .version.Patch
|
|
118
157
|
```
|
|
119
158
|
|
|
120
159
|
This increments the numeric value at the specified path by 1.
|
|
@@ -147,13 +186,27 @@ semverctl follows the [Semantic Versioning 2.0.0](https://semver.org/) specifica
|
|
|
147
186
|
|
|
148
187
|
## Dry-Run Mode
|
|
149
188
|
|
|
150
|
-
Use `--dry-run` to preview changes without
|
|
189
|
+
Use `--dry-run` to preview file changes or tag actions without mutation:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
semverctl bump file package.json --dry-run
|
|
193
|
+
semverctl bump tag --dry-run
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
For file commands, this outputs a unified diff showing what would change.
|
|
197
|
+
|
|
198
|
+
## JSON Output
|
|
199
|
+
|
|
200
|
+
Use `--json` for machine-readable automation output:
|
|
151
201
|
|
|
152
202
|
```bash
|
|
153
|
-
semverctl bump --dry-run
|
|
203
|
+
semverctl bump tag --dry-run --json
|
|
204
|
+
semverctl set tag 1.2.3 --json
|
|
205
|
+
semverctl bump file package.json --dry-run --json
|
|
154
206
|
```
|
|
155
207
|
|
|
156
|
-
|
|
208
|
+
When `--json` is enabled, both success and failure responses are printed as JSON to stdout.
|
|
209
|
+
Failures still return a non-zero exit code.
|
|
157
210
|
|
|
158
211
|
## Exit Codes
|
|
159
212
|
|
package/bin/semverctl
CHANGED
|
Binary file
|
package/package.json
CHANGED