Skip to content

Commit 22e8ceb

Browse files
committed
Add postflight to cask to remove quarantine attribute
1 parent 0862fda commit 22e8ceb

1 file changed

Lines changed: 29 additions & 21 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,35 @@ jobs:
7272
cd homebrew-tap
7373
7474
# Update cask file
75-
cat > Casks/anylinuxfs-gui.rb << EOF
76-
cask "anylinuxfs-gui" do
77-
version "${VERSION}"
78-
sha256 "${SHA256}"
79-
80-
url "https://github.com/fenio/anylinuxfs-gui/releases/download/v#{version}/anylinuxfs-gui_#{version}_aarch64.dmg"
81-
name "anylinuxfs GUI"
82-
desc "macOS GUI for anylinuxfs - mount Linux filesystems on macOS"
83-
homepage "https://github.com/fenio/anylinuxfs-gui"
84-
85-
depends_on formula: "nohajc/anylinuxfs/anylinuxfs"
86-
depends_on arch: :arm64
87-
88-
app "anylinuxfs-gui.app"
89-
90-
zap trash: [
91-
"~/Library/Caches/com.anylinuxfs.gui",
92-
"~/Library/Preferences/com.anylinuxfs.gui.plist",
93-
]
94-
end
95-
EOF
75+
cat > Casks/anylinuxfs-gui.rb << 'EOF'
76+
cask "anylinuxfs-gui" do
77+
version "${VERSION}"
78+
sha256 "${SHA256}"
79+
80+
url "https://github.com/fenio/anylinuxfs-gui/releases/download/v#{version}/anylinuxfs-gui_#{version}_aarch64.dmg"
81+
name "anylinuxfs GUI"
82+
desc "macOS GUI for anylinuxfs - mount Linux filesystems on macOS"
83+
homepage "https://github.com/fenio/anylinuxfs-gui"
84+
85+
depends_on formula: "nohajc/anylinuxfs/anylinuxfs"
86+
depends_on arch: :arm64
87+
88+
app "anylinuxfs-gui.app"
89+
90+
postflight do
91+
system_command "/usr/bin/xattr",
92+
args: ["-cr", "#{appdir}/anylinuxfs-gui.app"]
93+
end
94+
95+
zap trash: [
96+
"~/Library/Caches/com.anylinuxfs.gui",
97+
"~/Library/Preferences/com.anylinuxfs.gui.plist",
98+
]
99+
end
100+
EOF
101+
# Replace version/sha placeholders
102+
sed -i '' "s/\${VERSION}/${VERSION}/g" Casks/anylinuxfs-gui.rb
103+
sed -i '' "s/\${SHA256}/${SHA256}/g" Casks/anylinuxfs-gui.rb
96104

97105
# Commit and push
98106
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)