Skip to content

Commit 60dceea

Browse files
authored
Merge pull request #224118 from Homebrew/use-rename
various: use rename instead of preflight
2 parents 1653a28 + 275cab4 commit 60dceea

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

Casks/a/asix-ax88179.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
end
1818
end
1919

20+
disable! date: "2026-09-01", because: :fails_gatekeeper_check
21+
2022
depends_on macos: ">= :monterey"
2123
container nested: "ASIX_USB_Device_Installer_v#{version.csv.first}.dmg"
2224

23-
pkg "ASIX_USB_Device_Installer_v#{version.csv.first}.pkg"
25+
rename "ASIX_USB_Device_Un*.pkg", "AX88179_178A_Uninstall.pkg"
2426

25-
preflight do
26-
staged_path.glob("ASIX_USB_Device_Un*.pkg").first.rename(staged_path/"AX88179_178A_Uninstall.pkg")
27-
end
27+
pkg "ASIX_USB_Device_Installer_v#{version.csv.first}.pkg"
2828

2929
uninstall early_script: {
3030
executable: "/usr/sbin/installer",

Casks/i/insta360-studio.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
end
3838
end
3939

40-
# FIXME: Change pkg on next release to
41-
# pkg "Insta360Studio_#{version.csv.first}_#{version.csv.second}(#{version.csv.third})#{version.csv.fourth}.pkg"
42-
pkg "Insta360Studio_#{version.csv.first}_#{version.csv.second}(#{version.csv.third})_#{version.csv.fourth.split("_")[1..3].join("_")}_1754557465478.pkg"
40+
# The pkg is often inconsistently named comparatively to the url version
41+
rename "Insta360Studio*.pkg", "Insta360Studio.pkg"
42+
43+
pkg "Insta360Studio.pkg"
4344

4445
uninstall quit: "com.insta360.studio",
4546
pkgutil: [

Casks/m/mbed-studio.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
strategy :header_match
1313
end
1414

15-
pkg "MbedStudio.pkg"
15+
rename "MbedStudio-*.pkg", "MbedStudio.pkg"
1616

17-
preflight do
18-
staged_path.glob("MbedStudio-*.pkg").first.rename("#{staged_path}/MbedStudio.pkg")
19-
end
17+
pkg "MbedStudio.pkg"
2018

2119
uninstall pkgutil: "com.arm.mbed.studio"
2220

Casks/o/overdrive-media-console.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
deprecate! date: "2024-07-04", because: :discontinued
1212
disable! date: "2025-07-04", because: :discontinued
1313

14-
pkg "OverDrive-Mac-Installer.pkg"
14+
rename "OverDrive-Mac-Installer-Version-*.pkg", "OverDrive-Mac-Installer.pkg"
1515

16-
preflight do
17-
staged_path.glob("OverDrive-Mac-Installer-Version-*.pkg").first.rename(staged_path/"OverDrive-Mac-Installer.pkg")
18-
end
16+
pkg "OverDrive-Mac-Installer.pkg"
1917

2018
uninstall pkgutil: "com.overdrive.overdriveMediaConsole.*"
2119

Casks/r/rode-central.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@
1616

1717
depends_on macos: ">= :catalina"
1818

19-
pkg "RØDE Central.pkg"
19+
rename "RØDE Central*.pkg", "RØDE Central.pkg"
2020

21-
preflight do
22-
staged_path.glob("RØDE Central*.pkg")&.first&.rename(staged_path/"RØDE Central.pkg")
23-
end
21+
pkg "RØDE Central.pkg"
2422

2523
uninstall pkgutil: "com.rodecentral.installer"
2624

0 commit comments

Comments
 (0)