Skip to content

Commit

Permalink
retroshare: update version, livecheck, add Rosetta
Browse files Browse the repository at this point in the history
  • Loading branch information
krehel committed Sep 7, 2024
1 parent 6221870 commit a2301c4
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions Casks/r/retroshare.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
cask "retroshare" do
version "0.6.6"
sha256 "9a52ae0da3235faba1cb3f4e2b59916d1d0883378ab538c443122f96b935335d"
version "0.6.7.2,0.6.7a,0c03e93a4-01-03-2024,10.15.7,5.15.11"
sha256 "6757a0bffba36fd85515117edba7e821bb3105500f8a282be942abeee3373230"

url "https://github.com/RetroShare/RetroShare/releases/download/v#{version}/RetroShare-#{version}-MacOS-10.14-Qt-5.14.1.dmg",
url "https://github.com/RetroShare/RetroShare/releases/download/v#{version.csv.first}/RetroShare-#{version.csv.second}-#{version.csv.third}-MacOS-#{version.csv.fourth}-Qt-#{version.csv.fifth}.dmg",
verified: "github.com/RetroShare/RetroShare/"
name "RetroShare"
desc "Friend-2-Friend and secure decentralised communication platform"
homepage "https://retroshare.cc/"

livecheck do
url :url
strategy :github_latest
regex(/
Retroshare[._-]
(\d+(?:\.\d+)+[a-z]?)[._-]
([\h-]+)[._-]
MacOS[._-]
(\d+(?:\.\d+)+)[._-]
Qt[._-]
(\d+(?:\.\d+)+)\.dmg$
/xi)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"] || release["prerelease"]

tag_version = release["tag_name"][/^v?(\d+(?:\.\d+)+)$/i, 1]
next if tag_version.blank?

release["assets"]&.map do |asset|
match = asset["name"]&.match(regex)
next if match.blank?

"#{tag_version},#{match[1]},#{match[2]},#{match[3]},#{match[4]}"
end
end.flatten
end
end

app "retroshare.app"

caveats do
requires_rosetta
end
end

0 comments on commit a2301c4

Please sign in to comment.