brunch 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +16 -3
- data/lib/brunch/version.rb +1 -1
- data/lib/brunch/worktree_mode.rb +17 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 668bcb5a607af2adcad5006541dc927be6e1c5277d4c79f57b46de725e96076b
|
|
4
|
+
data.tar.gz: c9a02342f703ce5546860760165f4e6b3226cbc6d686f1b5b12a3891e27ad85d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d47e2a2fa7a68de063d05696eadaac3e4e41939d4e9faac87c875752c0a4e83542a13dfe9a0171b17590f7208825088de95875c87e156c10b91be2fed7a43393
|
|
7
|
+
data.tar.gz: 94449f91dbaa4bbcb70ab6aca393068f4e25e0e92797487195de86ffd05f5d2c50ab7f3f50b6fe2837938f1da6d5e6cbca03f34ffe3309e4789e411854c0fa5f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.9.1 - 2026-10-03
|
|
6
|
+
|
|
7
|
+
- Replace `brunch ports` with `brunch list` and add `brunch watch` for a
|
|
8
|
+
continuously refreshed interactive view of branch environments.
|
|
9
|
+
|
|
5
10
|
## 0.9.0 - 2026-10-02
|
|
6
11
|
|
|
7
12
|
- Remove environments for deleted local branches after the next Brunch command,
|
data/README.md
CHANGED
|
@@ -176,15 +176,22 @@ Then:
|
|
|
176
176
|
cd ../feature-a
|
|
177
177
|
|
|
178
178
|
brunch port
|
|
179
|
-
brunch
|
|
179
|
+
brunch list
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
`brunch port` prints the current worktree's port.
|
|
183
183
|
|
|
184
|
-
`brunch
|
|
184
|
+
`brunch list` groups the current and previously activated branches under each
|
|
185
185
|
worktree. Stopped branches appear in gray and retain their worktree's port for
|
|
186
186
|
the next activation.
|
|
187
187
|
|
|
188
|
+
```bash
|
|
189
|
+
brunch watch
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
`brunch watch` shows the same view and refreshes it every second. Press
|
|
193
|
+
`Ctrl-C` to stop watching.
|
|
194
|
+
|
|
188
195
|
Switching branches inside one worktree does not affect environments running in other worktrees.
|
|
189
196
|
|
|
190
197
|
If you create a worktree with plain Git:
|
|
@@ -331,11 +338,17 @@ brunch port
|
|
|
331
338
|
Print the current worktree's port.
|
|
332
339
|
|
|
333
340
|
```bash
|
|
334
|
-
brunch
|
|
341
|
+
brunch list
|
|
335
342
|
```
|
|
336
343
|
|
|
337
344
|
List current and stopped branch environments grouped by worktree.
|
|
338
345
|
|
|
346
|
+
```bash
|
|
347
|
+
brunch watch
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Continuously refresh the branch-environment list in an interactive terminal.
|
|
351
|
+
|
|
339
352
|
```bash
|
|
340
353
|
brunch stop
|
|
341
354
|
```
|
data/lib/brunch/version.rb
CHANGED
data/lib/brunch/worktree_mode.rb
CHANGED
|
@@ -23,13 +23,14 @@ module Brunch
|
|
|
23
23
|
in ["branch-deleted", ref, oid] then record_deleted_branch(ref, oid)
|
|
24
24
|
in ["cleanup"] | ["register", _] then worktree_cleanup
|
|
25
25
|
in ["status"] then worktree_status
|
|
26
|
-
in ["
|
|
26
|
+
in ["list"] then worktree_ports
|
|
27
|
+
in ["watch"] then worktree_watch
|
|
27
28
|
in ["port"] then worktree_port
|
|
28
29
|
in ["logs", *arguments] then worktree_logs(arguments)
|
|
29
30
|
in ["run", "--", *command] if !command.empty? then worktree_run(command)
|
|
30
31
|
in ["doctor"] then worktree_doctor
|
|
31
32
|
else
|
|
32
|
-
warn "Usage: brunch {activate|start <current-ref>|stop|restart|status|
|
|
33
|
+
warn "Usage: brunch {activate|start <current-ref>|stop|restart|status|list|watch|port|logs [args]|run -- <cmd>|doctor|cleanup}"
|
|
33
34
|
return 64
|
|
34
35
|
end
|
|
35
36
|
0
|
|
@@ -394,6 +395,20 @@ module Brunch
|
|
|
394
395
|
end
|
|
395
396
|
end
|
|
396
397
|
|
|
398
|
+
def worktree_watch
|
|
399
|
+
raise CLI::OperationError, "brunch watch requires an interactive terminal." unless $stdout.tty?
|
|
400
|
+
|
|
401
|
+
loop do
|
|
402
|
+
print "\e[2J\e[H"
|
|
403
|
+
worktree_ports
|
|
404
|
+
puts "\nRefreshing every second. Press Ctrl-C to stop."
|
|
405
|
+
$stdout.flush
|
|
406
|
+
sleep 1
|
|
407
|
+
end
|
|
408
|
+
rescue Interrupt
|
|
409
|
+
puts "\nStopped watching."
|
|
410
|
+
end
|
|
411
|
+
|
|
397
412
|
def worktree_port
|
|
398
413
|
record, = current_worktree_entry(state)
|
|
399
414
|
raise CLI::OperationError, "No Brunch environment in this worktree." unless record
|