Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,28 @@ jobs:
generate_completions_from_executable "gortex",
shell_parameter_format: :cobra

# A running daemon holds the previous binary's image and the
# store lock across an upgrade; stop it first (only when one
# is actually answering) and restart onto the new binary after
# install. Fresh installs and CI never launch a daemon — the
# marker file records "was running" between the two hooks.
pre_install do
bin = File.join(HOMEBREW_PREFIX, "bin", "gortex")
next unless File.executable?(bin)
status = system_command(bin, args: ["daemon", "status"])
next unless status.success?
File.write(File.join(Dir.tmpdir, "gortex-cask-daemon-was-running"), "1")
system_command(bin, args: ["daemon", "stop"])
end
post_install do
marker = File.join(Dir.tmpdir, "gortex-cask-daemon-was-running")
if File.exist?(marker)
File.delete(marker)
system_command(File.join(HOMEBREW_PREFIX, "bin", "gortex"),
args: ["daemon", "restart"])
end
end

# No zap stanza required
end
EOF
Expand Down
Loading