patchy-cli 0.0.15 → 0.0.16
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 +30 -0
- package/package.json +6 -6
- package/schema.json +3 -0
package/README.md
CHANGED
|
@@ -214,6 +214,36 @@ Within each patch set files follow the same folder structure as in the `source_r
|
|
|
214
214
|
|
|
215
215
|
`patchy generate` automatically removes stale files in `patches/<patch-set>` that no longer correspond to changes in `target_repo`.
|
|
216
216
|
|
|
217
|
+
## Hooks
|
|
218
|
+
|
|
219
|
+
Patch sets can include executable scripts that run before and after patches are applied:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
patches/
|
|
223
|
+
└── 001-add-feature/
|
|
224
|
+
├── patchy-post-apply # runs after patches
|
|
225
|
+
├── src/file.ts.diff
|
|
226
|
+
├── src/new-file.ts
|
|
227
|
+
└── patchy-pre-apply # runs before patches
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Hook execution
|
|
231
|
+
|
|
232
|
+
- Hooks run with `cwd` set to `target_repo`
|
|
233
|
+
- Environment variables: `PATCHY_TARGET_REPO`, `PATCHY_PATCH_SET`, `PATCHY_PATCHES_DIR`, `PATCHY_PATCH_SET_DIR`, `PATCHY_BASE_REVISION`
|
|
234
|
+
- Non-zero exit aborts `patchy apply`
|
|
235
|
+
- Hooks must be executable (`chmod +x`)
|
|
236
|
+
|
|
237
|
+
### Custom hook prefix
|
|
238
|
+
|
|
239
|
+
```jsonc
|
|
240
|
+
{
|
|
241
|
+
"hook_prefix": "my-prefix-" // Override: --hook-prefix | env: PATCHY_HOOK_PREFIX
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
With prefix `my-prefix-`, hooks are named `my-prefix-pre-apply` and `my-prefix-post-apply`.
|
|
246
|
+
|
|
217
247
|
## Commands
|
|
218
248
|
|
|
219
249
|
### `patchy generate`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchy-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "A CLI tool for managing Git patch workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"url": "https://github.com/richardgill/patchy"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
|
-
"patchy-cli-linux-x64": "0.0.
|
|
68
|
-
"patchy-cli-linux-arm64": "0.0.
|
|
69
|
-
"patchy-cli-darwin-x64": "0.0.
|
|
70
|
-
"patchy-cli-darwin-arm64": "0.0.
|
|
71
|
-
"patchy-cli-windows-x64": "0.0.
|
|
67
|
+
"patchy-cli-linux-x64": "0.0.16",
|
|
68
|
+
"patchy-cli-linux-arm64": "0.0.16",
|
|
69
|
+
"patchy-cli-darwin-x64": "0.0.16",
|
|
70
|
+
"patchy-cli-darwin-arm64": "0.0.16",
|
|
71
|
+
"patchy-cli-windows-x64": "0.0.16"
|
|
72
72
|
},
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|