brunch 0.8.2 → 0.8.3
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 +6 -0
- data/lib/brunch/managers.rb +11 -1
- data/lib/brunch/version.rb +1 -1
- data/lib/brunch/worktree_mode.rb +8 -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: e566d43380555cbea682f52dbbedc64bf1e4a95b681a7c60b266c98aedd5f28e
|
|
4
|
+
data.tar.gz: 212f72d4aa56f57d4ca878a9da515fbdb8730317f2e61ac8b55b33128f679b0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c3a334e07d02110511e678b252880bbf3c7ac8028377611c72d275d7018d89adeba270377f4a6f325c53783c34a674f23af5e374ccefc8b54e09ac07602ccb7
|
|
7
|
+
data.tar.gz: a5f2857d35bb150e3adc613eb731636b43a286ba74ec4e2afd29a3e75ca9c9433dda5e174fa092db8b179ec9840fcf7ecf3bfd198a6e9104eb0272e017e9eaa3
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.8.3 - 2026-09-29
|
|
6
|
+
|
|
7
|
+
- Detect containers that exit immediately after a Compose resume and report the
|
|
8
|
+
failure instead of claiming the branch environment is running.
|
|
9
|
+
- Retry activation when a recorded running environment has actually stopped.
|
|
10
|
+
|
|
5
11
|
## 0.8.2 - 2026-09-29
|
|
6
12
|
|
|
7
13
|
- Resume stopped branch containers without rebuilding or replacing them when
|
data/lib/brunch/managers.rb
CHANGED
|
@@ -68,7 +68,17 @@ module Brunch
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def start(entry) = compose(entry, "up", "--detach", "--build", "--remove-orphans")
|
|
71
|
-
|
|
71
|
+
|
|
72
|
+
def resume(entry)
|
|
73
|
+
return false unless compose(entry, "start")
|
|
74
|
+
|
|
75
|
+
# Compose can report success even when the application exits immediately.
|
|
76
|
+
3.times do
|
|
77
|
+
sleep 0.2
|
|
78
|
+
return false unless healthy?(entry)
|
|
79
|
+
end
|
|
80
|
+
true
|
|
81
|
+
end
|
|
72
82
|
|
|
73
83
|
def status(entry)
|
|
74
84
|
return "unavailable" unless available?
|
data/lib/brunch/version.rb
CHANGED
data/lib/brunch/worktree_mode.rb
CHANGED
|
@@ -106,7 +106,10 @@ module Brunch
|
|
|
106
106
|
existing = record&.fetch("environments", {})&.[](ref)
|
|
107
107
|
current_ref = record&.[]("current")
|
|
108
108
|
end
|
|
109
|
-
|
|
109
|
+
if existing && !force && existing["snapshot"] == path && existing["status"] == "running" &&
|
|
110
|
+
current_ref == ref && worktree_manager(existing).status(existing) != "stopped"
|
|
111
|
+
return
|
|
112
|
+
end
|
|
110
113
|
|
|
111
114
|
previous = nil
|
|
112
115
|
port = nil
|
|
@@ -124,7 +127,10 @@ module Brunch
|
|
|
124
127
|
end
|
|
125
128
|
if existing && !force && existing["snapshot"] == path && existing["status"] != "starting"
|
|
126
129
|
with_state_lock { |data| data.fetch("worktrees").fetch(id)["current"] = ref }
|
|
127
|
-
|
|
130
|
+
unless worktree_manager(existing).resume(existing)
|
|
131
|
+
abort "Could not resume environment for #{path}; the container may have exited. Check brunch logs. " \
|
|
132
|
+
"If dependencies changed, rebuild with brunch restart (this replaces the container)."
|
|
133
|
+
end
|
|
128
134
|
|
|
129
135
|
with_state_lock do |data|
|
|
130
136
|
data.fetch("worktrees").fetch(id).fetch("environments").fetch(ref)["status"] = "running"
|