Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Casks/i/intiface-central.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cask "intiface-central" do
version "3.0.1,37"
sha256 "4dca9f17f8d082564e4480b8eb15e68acfeb593be8f000690184d8d585e5c2c9"

url "https://github.com/intiface/intiface-central/releases/download/v#{version.csv.first}%2B#{version.csv.second}/intiface-central-v#{version.csv.first}-macos-universal.dmg"
name "Intiface Central"
desc "Frontend application for the Buttplug sex toy control library"
homepage "https://github.com/intiface/intiface-central"

livecheck do
url :url
regex(/^v?(\d+(?:\.\d+)+)\+(\d+)$/i)
strategy :github_latest do |json, regex|
match = json["tag_name"]&.match(regex)
next if match.blank?

"#{match[1]},#{match[2]}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
regex(/^v?(\d+(?:\.\d+)+)\+(\d+)$/i)
strategy :github_latest do |json, regex|
match = json["tag_name"]&.match(regex)
next if match.blank?
"#{match[1]},#{match[2]}"
regex(/^v?(\d+(?:\.\d+)+)(?:\+(\d+))?$/i)
strategy :github_latest do |json, regex|
match = json["tag_name"]&.match(regex)
next if match.blank?
match[2].present? ? "#{match[1]},#{match[2]}" : match[1]

end
end

depends_on macos: ">= :big_sur"

app "Intiface Central.app"

zap trash: [
"~/Library/Application Scripts/com.nonpolynomial.intifacecentral",
"~/Library/Containers/com.nonpolynomial.intifacecentral",
]
end
Loading