-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
tla+-toolbox.rb
35 lines (29 loc) · 1.02 KB
/
tla+-toolbox.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cask "tla+-toolbox" do
version "1.7.4"
sha256 "258677703e28a65d2d85c75388756a51198041a2555923e52ad5d6925f5c5bd7"
url "https://github.com/tlaplus/tlaplus/releases/download/v#{version}/TLAToolbox-#{version}-macosx.cocoa.x86_64.zip",
verified: "github.com/tlaplus/tlaplus/"
name "TLA+ Toolbox"
desc "IDE for TLA+"
homepage "https://lamport.azurewebsites.net/tla/toolbox.html"
# Not every GitHub release provides a file for macOS, so we check multiple
# recent releases instead of only the "latest" release.
livecheck do
url :url
regex(/^TLAToolbox[._-]v?(\d+(?:\.\d+)+)[._-]macosx[._-]cocoa[._-]x86_64\.(?:dmg|pkg|zip)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"] || release["prerelease"]
release["assets"]&.map do |asset|
match = asset["name"]&.match(regex)
next if match.blank?
match[1]
end
end.flatten
end
end
app "TLA+ Toolbox.app"
caveats do
requires_rosetta
end
end