1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 12:51:31 +03:00

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
This commit is contained in:
Wez Furlong 2021-05-22 08:30:10 -07:00
parent 78424036f9
commit 8418495dbd
5 changed files with 49 additions and 21 deletions

View File

@ -100,7 +100,7 @@ jobs:
shell: bash
run: |
export MACOSX_DEPLOYMENT_TARGET=10.9
cp wezterm.rb homebrew-wezterm/Formula/wezterm.rb
cp wezterm.rb homebrew-wezterm/Casks/wezterm.rb
- name: "Commit homebrew tap changes"

View File

@ -369,7 +369,7 @@ cargo build --all --release""",
),
RunStep(
"Update homebrew tap formula",
"cp wezterm.rb homebrew-wezterm/Formula/wezterm.rb",
"cp wezterm.rb homebrew-wezterm/Casks/wezterm.rb",
),
ActionStep(
"Commit homebrew tap changes",

View File

@ -2,24 +2,51 @@
# 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@"
class Wezterm < Formula
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/"
url "https://github.com/wez/wezterm/releases/download/@TAG@/WezTerm-macos-@TAG@.zip"
sha256 "@SHA256@"
head "https://github.com/wez/wezterm/releases/download/nightly/WezTerm-macos-nightly.zip"
def install
prefix.install "WezTerm.app"
bindir = "#{prefix}/WezTerm.app"
macosdir = "#{bindir}/Contents/MacOS"
if File.directory?(macosdir) then
bindir = macosdir
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
["wezterm", "wezterm-gui", "wezterm-mux-server", "strip-ansi-escapes"].each { |tool|
bin.write_exec_script "#{bindir}/#{tool}"
}
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

View File

@ -23,6 +23,7 @@ As features stabilize some brief notes about them will accumulate here.
* Improved: messaging around [exit_behavior](https://wezfurlong.org/wezterm/config/lua/config/exit_behavior.html)
* Fixed: errors loading custom color schemes are now logged to the error log [#794](https://github.com/wez/wezterm/issues/794)
* Fixed: OSC 7 (current working directory) now works with paths that contain spaces and other special characters. Thanks to [@Arvedui](https://github.com/Arvedui)! [#799](https://github.com/wez/wezterm/pull/799)
* Changed: the homebrew tap is now a Cask that installs to the /Applications directory on macOS. Thanks to [@laggardkernel](https://github.com/laggardkernel)!
### 20210502-154244-3f7122cb

View File

@ -22,21 +22,21 @@ WezTerm is available for [brew](https://brew.sh/) users in a tap:
```bash
$ brew tap wez/wezterm
$ brew install wezterm
$ brew install --cask wezterm --no-quarantine
```
If you'd like to use a nightly build you can perform a head install:
If you'd like to use a nightly build:
```bash
$ brew install --HEAD wezterm
$ brew install --cask wezterm-nightly --no-quarantine
```
to upgrade to a newer nightly, it is simplest to remove then
install:
```bash
$ brew rm wezterm
$ brew install --HEAD wezterm
$ brew rm --cask wezterm-nightly
$ brew upgrade --cask wezterm-nightly
```
## MacPorts