1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-22 04:56:12 +03:00
wezterm/ci/wezterm-homebrew-macos.rb.template
Wez Furlong 8418495dbd brew tap is now a Cask on macOS
This updates the docs to reflect the changes in
https://github.com/wez/homebrew-wezterm/pull/2 and updates the
automation to use the cask as the template, and to update and commit the
task version of the formula.

Thanks @laggardkernel!

closes: https://github.com/wez/homebrew-wezterm/issues/1
refs: https://github.com/wez/wezterm/issues/501
2021-05-22 08:30:10 -07:00

53 lines
1.5 KiB
Ruby

# Note: if you are viewing this from the tap repo, this file is automatically
# updated from:
# https://github.com/wez/wezterm/blob/main/ci/wezterm-homebrew-macos.rb.template
# by automation in the wezterm repo.
# vim:ft=ruby:
cask "wezterm" do
version "@TAG@"
sha256 "@SHA256@"
url "https://github.com/wez/wezterm/releases/download/#{version}/WezTerm-macos-#{version}.zip"
name "WezTerm"
desc "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust"
homepage "https://wezfurlong.org/wezterm/"
conflicts_with cask: "wez/wezterm/wezterm-nightly"
# Unclear what the minimal OS version is
# depends_on macos: ">= :sierra"
app "WezTerm.app"
[
"wezterm",
"wezterm-gui",
"wezterm-mux-server",
"strip-ansi-escapes"
].each do |tool|
binary "#{appdir}/WezTerm.app/Contents/MacOS/#{tool}"
end
preflight do
# Move "WezTerm-macos-#{version}/WezTerm.app" out of the subfolder
staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
if staged_subfolder
FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
FileUtils.rm_rf(staged_subfolder)
end
end
zap trash: [
"~/Library/Saved Application State/com.github.wez.wezterm.savedState",
]
def caveats; <<~EOS
Cask #{token} related executables like 'wezterm', 'wezterm-gui',
'wezterm-mux-server', are linked into
/usr/local/bin/ for x86 Mac,
/opt/homebrew/bin/ for M1 Mac.
Removal of them is ensured by 'brew uninstall --cask #{token}'.
EOS
end
end