@metalagman/semverctl-linux-arm64 0.0.10 โ†’ 0.0.12

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 +95 -32
  2. package/bin/semverctl +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,73 +1,93 @@
1
1
  # semverctl
2
2
 
3
3
  [![Go Report Card](https://goreportcard.com/badge/github.com/metalagman/semverctl)](https://goreportcard.com/report/github.com/metalagman/semverctl)
4
- [![lint](https://github.com/metalagman/semverctl/actions/workflows/lint.yml/badge.svg)](https://github.com/metalagman/semverctl/actions/workflows/lint.yml)
5
- [![test](https://github.com/metalagman/semverctl/actions/workflows/test.yml/badge.svg)](https://github.com/metalagman/semverctl/actions/workflows/test.yml)
4
+ [![ci](https://github.com/metalagman/semverctl/actions/workflows/ci.yml/badge.svg)](https://github.com/metalagman/semverctl/actions/workflows/ci.yml)
6
5
  [![codecov](https://codecov.io/github/metalagman/semverctl/graph/badge.svg)](https://codecov.io/github/metalagman/semverctl)
7
6
  [![version](https://img.shields.io/github/v/release/metalagman/semverctl?sort=semver)](https://github.com/metalagman/semverctl/releases)
8
7
  [![npm](https://img.shields.io/npm/v/%40metalagman%2Fsemverctl)](https://www.npmjs.com/package/@metalagman/semverctl)
9
8
  [![PyPI](https://img.shields.io/pypi/v/semverctl)](https://pypi.org/project/semverctl/)
10
9
  [![license](https://img.shields.io/github/license/metalagman/semverctl)](LICENSE)
11
10
 
12
- CLI for bumping and setting SemVer values in JSON/YAML files
11
+ CLI for bumping and setting SemVer values in JSON/YAML files and Git tags
13
12
 
14
13
  ## Features
15
14
 
16
15
  - โœจ **Semantic Versioning** - Strict SemVer 2.0.0 compliance with prerelease and build metadata support
17
- - ๐Ÿ“ **Multiple Formats** - JSON and YAML file support
16
+ - ๐Ÿ“ **File + Tag Workflows** - Explicit `bump/set file` and `bump/set tag` commands
17
+ - ๐Ÿท๏ธ **Git Tag Releases** - Bump from latest stable `vX.Y.Z` tag or set explicit tags
18
18
  - ๐ŸŽฏ **Path Navigation** - Dot-notation paths for nested version fields (e.g., `.app.version`)
19
19
  - ๐Ÿ”ข **Numeric Bumping** - Bump individual numeric fields for object-style versions
20
20
  - ๐Ÿงช **Dry-Run Mode** - Preview changes with unified diff output
21
+ - ๐Ÿค– **Automation-Friendly JSON** - `--json` output for machine-readable success/error payloads
22
+ - ๐Ÿ”’ **Safety Checks** - Tag operations require a clean repository state
21
23
  - ๐ŸŒ **Cross-Platform** - Linux, macOS, and Windows support (CGO-free)
22
24
  - โšก **Zero Dependencies** - Pure Go implementation with no runtime dependencies
23
25
  - ๐Ÿ“ฆ **Multiple Distribution Channels** - Go install, npm, uv/PyPI, and GitHub Releases
24
26
 
25
- ## Installation
27
+ ## Usage
26
28
 
27
- ### Go
29
+ ### Quickstart
28
30
 
29
31
  ```bash
30
- go install github.com/metalagman/semverctl/cmd/semverctl@latest
32
+ # Install globally
33
+ npm i -g @metalagman/semverctl@latest
34
+
35
+ # Bump patch version in package.json
36
+ semverctl bump file package.json
37
+
38
+ # Bump minor version in Helm Chart.yaml
39
+ semverctl bump file Chart.yaml --minor
40
+
41
+ # Create a new git tag for the next release
42
+ semverctl bump tag --push
31
43
  ```
32
44
 
33
- ### npm (Node.js)
45
+ ### Node.js (package.json)
34
46
 
35
47
  ```bash
36
- npx @metalagman/semverctl version
48
+ # Bump patch in package.json
49
+ semverctl bump file package.json
37
50
 
38
- # Or install globally
39
- npm install -g @metalagman/semverctl
40
- semverctl version
51
+ # Bump major version for a breaking change
52
+ semverctl bump file package.json --major
53
+
54
+ # Preview what would change without modifying the file
55
+ semverctl bump file package.json --minor --dry-run
41
56
  ```
42
57
 
43
- ### uv/Pip (Python)
58
+ ### Helm (Chart.yaml)
59
+
60
+ Helm Charts have two version fields: `version` (the chart version) and `appVersion` (the version of the application contained in the chart).
44
61
 
45
62
  ```bash
46
- uvx semverctl version
63
+ # Bump the Chart version (default .version path)
64
+ semverctl bump file Chart.yaml --patch
47
65
 
48
- # Or install
49
- uv pip install semverctl
50
- semverctl version
66
+ # Bump the appVersion explicitly
67
+ semverctl bump file Chart.yaml --minor --path appVersion
68
+
69
+ # Preview Helm chart changes
70
+ semverctl bump file Chart.yaml --major --dry-run
51
71
  ```
52
72
 
53
- ### Pre-built Binaries
73
+ ### Git Tags
54
74
 
55
- Download pre-built binaries from [GitHub Releases](https://github.com/metalagman/semverctl/releases):
75
+ Create and push tags for your releases.
56
76
 
57
77
  ```bash
58
- # Linux/macOS
59
- curl -L https://github.com/metalagman/semverctl/releases/latest/download/semverctl-linux-amd64 -o semverctl
60
- chmod +x semverctl
61
- sudo mv semverctl /usr/local/bin/
78
+ # Create and push the next patch tag (e.g., v1.0.1)
79
+ semverctl bump tag --push
62
80
 
63
- # Verify checksum (recommended)
64
- curl -L https://github.com/metalagman/semverctl/releases/latest/download/checksums.txt -o checksums.txt
65
- sha256sum -c checksums.txt
81
+ # Create the next minor tag (e.g., v1.1.0) without pushing
82
+ semverctl bump tag --minor
83
+
84
+ # Preview tag creation
85
+ semverctl bump tag --major --dry-run
66
86
  ```
67
87
 
68
- ## Usage
88
+ ### CLI Reference
69
89
 
70
- ### Bump File Version
90
+ #### Bump File Version
71
91
 
72
92
  Bump the semantic version in a specific JSON or YAML file:
73
93
 
@@ -89,7 +109,7 @@ semverctl bump file package.json --dry-run
89
109
  semverctl bump file package.json --dry-run --json
90
110
  ```
91
111
 
92
- ### Set File Version
112
+ #### Set File Version
93
113
 
94
114
  Set an explicit version value in a specific file:
95
115
 
@@ -107,7 +127,7 @@ semverctl set file 1.0.0 package.json --dry-run
107
127
  semverctl set file 1.2.3 package.json --json
108
128
  ```
109
129
 
110
- ### Bump Tag
130
+ #### Bump Tag
111
131
 
112
132
  Bump from the latest stable git tag (`vX.Y.Z`) and create a new annotated tag:
113
133
 
@@ -128,7 +148,7 @@ semverctl bump tag --push
128
148
  semverctl bump tag --dry-run --json
129
149
  ```
130
150
 
131
- ### Set Tag
151
+ #### Set Tag
132
152
 
133
153
  Create an explicit annotated git tag:
134
154
 
@@ -147,7 +167,7 @@ semverctl set tag 2.1.0 --push
147
167
  semverctl set tag 2.1.0 --json
148
168
  ```
149
169
 
150
- ### Numeric Bump
170
+ #### Numeric Bump
151
171
 
152
172
  For object-style version fields (e.g., `{ "Major": 1, "Minor": 2, "Patch": 3 }`),
153
173
  you can bump numeric scalar values:
@@ -158,6 +178,49 @@ semverctl bump file config.json --numeric --path .version.Patch
158
178
 
159
179
  This increments the numeric value at the specified path by 1.
160
180
 
181
+ ## Installation
182
+
183
+ ### Go
184
+
185
+ ```bash
186
+ go install github.com/metalagman/semverctl/cmd/semverctl@latest
187
+ ```
188
+
189
+ ### npm (Node.js)
190
+
191
+ ```bash
192
+ npx @metalagman/semverctl version
193
+
194
+ # Or install globally
195
+ npm install -g @metalagman/semverctl
196
+ semverctl version
197
+ ```
198
+
199
+ ### uv/Pip (Python)
200
+
201
+ ```bash
202
+ uvx semverctl version
203
+
204
+ # Or install
205
+ uv pip install semverctl
206
+ semverctl version
207
+ ```
208
+
209
+ ### Pre-built Binaries
210
+
211
+ Download pre-built binaries from [GitHub Releases](https://github.com/metalagman/semverctl/releases):
212
+
213
+ ```bash
214
+ # Linux/macOS
215
+ curl -L https://github.com/metalagman/semverctl/releases/latest/download/semverctl-linux-amd64 -o semverctl
216
+ chmod +x semverctl
217
+ sudo mv semverctl /usr/local/bin/
218
+
219
+ # Verify checksum (recommended)
220
+ curl -L https://github.com/metalagman/semverctl/releases/latest/download/checksums.txt -o checksums.txt
221
+ sha256sum -c checksums.txt
222
+ ```
223
+
161
224
  ## Path Syntax
162
225
 
163
226
  Paths use dot notation to navigate nested structures:
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.10"
19
+ "version": "0.0.12"
20
20
  }