Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,32 @@ jobs:
# puts the command itself on PATH.
binary "#{appdir}/yap.app/Contents/MacOS/yap"

# Homebrew replaces /Applications/yap.app, but a process keeps the
# image it already mapped. Without this you stay on the old version
# until something restarts the daemon, while "yap --version" reads
# the new binary on disk and agrees with the version you just
# installed — the worst shape for a bug, because it looks fixed.
#
# "kickstart -k" rather than an uninstall stanza: it replaces the
# job launchd already owns, so the daemon stays inside launchd and
# the plist — the login item — is untouched.
#
# Measured, because the alternative is losing someone's meeting:
# -k delivers SIGTERM, not SIGKILL, and yap catches SIGTERM and
# routes it through applicationWillTerminate. So a recording in
# flight is finalized and transcribes on the next start instead of
# losing its meta.json. launchd brings the new image up about five
# seconds later.
#
# must_succeed: false because an install with no login item has no
# job to restart, and launchctl exits 113 there. Not having asked
# for launch-at-login is not a reason to fail an upgrade.
postflight do
system_command "/bin/launchctl",
args: ["kickstart", "-k", "gui/#{Process.uid}/com.terrifiedbug.yap"],
must_succeed: false
end

# No uninstall stanza at all, and both halves of that are
# deliberate. Homebrew runs these directives on upgrade as well as
# uninstall: "launchctl" deletes
Expand Down
2 changes: 1 addition & 1 deletion Sources/yap/Yap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct Yap: ParsableCommand {
// The single source of truth for what this binary is. Nothing else
// holds a version constant, and the release workflow greps this
// literal against the tag, so a build can never claim the wrong one.
version: "0.1.3",
version: "0.1.4",
subcommands: [
Run.self, Start.self, Stop.self, Record.self, Models.self, Doctor.self, Setup.self,
Install.self, Bench.self,
Expand Down
Loading