Skip to content

Commit

Permalink
bump rancher 1.12.2 to 1.13.1 (fixes qemu on m3 mac) (#88)
Browse files Browse the repository at this point in the history
Release notes:
https://github.com/rancher-sandbox/rancher-desktop/releases/tag/v1.13.1

This also helps us get rid of some of the hacks we had to add to support
m3 mac.
  • Loading branch information
pb-dod authored Apr 9, 2024
1 parent 3862ca1 commit edb253a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
6 changes: 3 additions & 3 deletions Casks/ih-rancher.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cask "ih-rancher" do
version "1.12.2"
version "1.13.1"

if Hardware::CPU.intel?
url "https://github.com/rancher-sandbox/rancher-desktop/releases/download/v#{version}/Rancher.Desktop-#{version}.x86_64.dmg"
sha256 "299034631ee0faa747f55b2ca7d6682419a15563a706ef8a2415e8638108fd35"
sha256 "75a5532f5d2332f07a556c75455367c26954471de5d4ba436f9ab4aa3b309ac2"
else
url "https://github.com/rancher-sandbox/rancher-desktop/releases/download/v#{version}/Rancher.Desktop-#{version}.aarch64.dmg"
sha256 "9ab8131239a34ff880b79617f71254a502fb30a3dd7908b13533b84e9698a499"
sha256 "7334e2246c8e0d015733697f9bc9abae18973296671595f6b9e039870d327388"
end

name "Rancher Desktop"
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.49
0.1.50
2 changes: 1 addition & 1 deletion formula/ih-core.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class IhCore < Formula
VERSION="0.1.49"
VERSION="0.1.50"
desc "Brew formula for installing core tools used at Included Health engineering."
homepage "https://github.com/ConsultingMD/homebrew-ih-public"
license "CC BY-NC-ND 4.0"
Expand Down
25 changes: 0 additions & 25 deletions lib/core/rancher/step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,6 @@ function ih::setup::core.rancher::test() {
return 1
fi

# Use vz (requires macOS >=13.3) instead of qemu on M3 macs to resolve issues.
# More details: https://github.com/lima-vm/lima/issues/1996
local macos_version=$(ih::arch::get_macos_version)
if ih::arch::is_m3_mac; then
if (( $(echo "$macos_version < 13.3" | bc -l) )); then
ih::log::error "macOS version 13.3 or higher is required for M3 Macs."
return 1
elif ! grep -q "<string>vz</string>" "$PLIST_DST"; then
ih::log::debug "The PLIST file needs to be updated to use 'vz' for M3 Macs."
return 1
fi
fi

return 0
}

Expand Down Expand Up @@ -157,18 +144,6 @@ function ih::setup::core.rancher::install() {
fi
fi

# Use vz (requires macOS >=13.3) instead of qemu on M3 macs to resolve issues.
# More details: https://github.com/lima-vm/lima/issues/1996
if ih::arch::is_m3_mac; then
if (( $(echo "$macos_version < 13.3" | bc -l) )); then
ih::log::error "macOS version 13.3 or higher is required for M3 Macs."
return 1 # Abort the installation for M3 Macs
elif ! grep -q "<string>vz</string>" "$PLIST_DST"; then
ih::log::debug "Updating PLIST to use 'vz' for Virtualization for M3 Macs."
sudo sed -i '' 's/<string>qemu<\/string>/<string>vz<\/string>/g' "$PLIST_DST"
fi
fi

echo "Rancher Desktop has been installed successfully"
else
ih::log::warn "Could not install Rancher Desktop"
Expand Down
5 changes: 0 additions & 5 deletions lib/utils/arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,3 @@ ih::arch::mbrew() {
ih::arch::get_macos_version() {
sw_vers -productVersion | awk -F '.' '{ printf("%d.%d\n", $1, $2) }'
}

ih::arch::is_m3_mac() {
local hw_model=$(sysctl -n machdep.cpu.brand_string)
[[ "$hw_model" == *"M3"* ]]
}

0 comments on commit edb253a

Please sign in to comment.