patchy-cli 0.0.3 → 0.0.4
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 +43 -24
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,38 +1,61 @@
|
|
|
1
1
|
# patchy
|
|
2
2
|
|
|
3
|
-
An opinionated command-line tool for managing Git patch workflows.
|
|
3
|
+
An opinionated command-line tool for managing Git patch workflows.
|
|
4
4
|
|
|
5
5
|
## How it works
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. Make some edits (the patches!)
|
|
9
|
-
3. Create a repo for your patches → `~/my-patches`
|
|
10
|
-
3. `patchy generate --repo ~/target-1` → Creates `~/my-patches/patches/*.diff`
|
|
7
|
+
Patchy helps you manage `.diff` patches for a repository you want to modify.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
`patchy.json` (see [full config reference](#patchyjson) below)
|
|
10
|
+
```json5
|
|
11
|
+
{
|
|
12
|
+
"repo_url": "https://github.com/octocat/spoon-knife",
|
|
13
|
+
"patches_dir": "./patches/",
|
|
14
|
+
"clones_dir": "./clones/",
|
|
15
|
+
"repo_dir": "spoon-knife",
|
|
16
|
+
}
|
|
17
|
+
```
|
|
15
18
|
|
|
19
|
+
Initialize Patchy with:
|
|
20
|
+
```bash
|
|
21
|
+
patchy init
|
|
22
|
+
```
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
You can `patchy repo clone` the repo into `./clones/` to complete the setup.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
Now you'll have
|
|
20
27
|
|
|
21
28
|
```
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
./
|
|
30
|
+
├── patches/
|
|
31
|
+
├── clones/
|
|
32
|
+
│ └── spoon-knife/
|
|
33
|
+
│ ├── path/to/existingFile.txt
|
|
34
|
+
└── patchy.json
|
|
24
35
|
```
|
|
25
36
|
|
|
37
|
+
Now you can make changes directly to `./clones/spoon-knife`
|
|
38
|
+
|
|
39
|
+
And generate patches with `patchy generate`
|
|
40
|
+
|
|
26
41
|
```
|
|
27
|
-
|
|
42
|
+
./
|
|
43
|
+
├── clones/
|
|
44
|
+
│ └── spoon-knife/
|
|
45
|
+
│ ├── path/to/existingFile.txt
|
|
46
|
+
│ └── path/to/newFile.txt
|
|
28
47
|
├── patches/
|
|
29
|
-
│ ├── path/
|
|
30
|
-
│ └── path/
|
|
48
|
+
│ ├── path/to/existingFile.txt.diff
|
|
49
|
+
│ └── path/to/newFile.txt
|
|
31
50
|
└── patchy.json
|
|
32
51
|
```
|
|
33
52
|
|
|
34
53
|
- **Edits** are stored as `.diff` files e.g. `existingFile.txt.diff`.
|
|
35
|
-
- **New files** are
|
|
54
|
+
- **New files** are copied as regular files e.g. `newFile.txt`.
|
|
55
|
+
|
|
56
|
+
You can reapply your changes later with:
|
|
57
|
+
|
|
58
|
+
`patchy apply`
|
|
36
59
|
|
|
37
60
|
### `patchy.json`
|
|
38
61
|
|
|
@@ -63,26 +86,22 @@ Precedence: CLI flags > Environment variables > `patchy.json`
|
|
|
63
86
|
|
|
64
87
|
```sh
|
|
65
88
|
curl -fsSL https://raw.githubusercontent.com/richardgill/patchy/main/install | bash
|
|
89
|
+
# follow instructions
|
|
90
|
+
patchy
|
|
66
91
|
```
|
|
67
92
|
|
|
68
93
|
Or via npm:
|
|
69
94
|
|
|
70
|
-
**Install script (recommended):**
|
|
71
|
-
|
|
72
|
-
```sh
|
|
73
|
-
curl -fsSL https://raw.githubusercontent.com/richardgill/patchy/main/install | bash
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Via npm:**
|
|
77
95
|
|
|
78
96
|
```sh
|
|
79
97
|
npm install -g patchy-cli
|
|
98
|
+
patchy-cli
|
|
80
99
|
```
|
|
81
100
|
|
|
82
101
|
Or use directly without installing:
|
|
83
102
|
|
|
84
103
|
```sh
|
|
85
|
-
npx patchy-cli
|
|
104
|
+
npx patchy-cli@latest
|
|
86
105
|
```
|
|
87
106
|
|
|
88
107
|
### Initialize patchy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "patchy-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "A CLI tool for managing Git patch workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"url": "https://github.com/richardgill/patchy"
|
|
61
61
|
},
|
|
62
62
|
"optionalDependencies": {
|
|
63
|
-
"patchy-cli-linux-x64": "0.0.
|
|
64
|
-
"patchy-cli-linux-arm64": "0.0.
|
|
65
|
-
"patchy-cli-darwin-x64": "0.0.
|
|
66
|
-
"patchy-cli-darwin-arm64": "0.0.
|
|
67
|
-
"patchy-cli-windows-x64": "0.0.
|
|
63
|
+
"patchy-cli-linux-x64": "0.0.4",
|
|
64
|
+
"patchy-cli-linux-arm64": "0.0.4",
|
|
65
|
+
"patchy-cli-darwin-x64": "0.0.4",
|
|
66
|
+
"patchy-cli-darwin-arm64": "0.0.4",
|
|
67
|
+
"patchy-cli-windows-x64": "0.0.4"
|
|
68
68
|
},
|
|
69
69
|
"publishConfig": {
|
|
70
70
|
"access": "public"
|