Skip to content

Commit

Permalink
coqide: rename to coq-platform, update
Browse files Browse the repository at this point in the history
* Renames the cask from `coqide` to `coq-platform`

* Adds the latest version for both ARM and Intel

* Update URL and livecheck
  • Loading branch information
krehel committed Nov 10, 2024
1 parent 23fa980 commit 026f56c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 22 deletions.
41 changes: 41 additions & 0 deletions Casks/c/coq-platform.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cask "coq-platform" do
arch arm: "arm64", intel: "x86_64"

on_arm do
version "2024.10.0,8.19.2024.10"
sha256 "20cee7656b1c2d5dee50c0eede2fbb860a96354dcab2d32ecba6f1186ec03cf8"
end
on_intel do
version "2023.11.0,8.18.2023.11"
sha256 "cf63fd3031e0593d76431918427591c384591bfabf8fe9dbd385f92c0f0a0065"
end

url "https://github.com/coq/platform/releases/download/#{version.csv.first}/coq-Platform-release-#{version.csv.first}-version.#{version.csv.second}-MacOS-#{arch}.dmg",
verified: "github.com/coq/platform/"
name "Coq"
desc "Formal proof management system"
homepage "https://coq.inria.fr/"

# Not every GitHub release provides a file for macOS or each arch
# so we check multiple recent releases instead of only the "latest" release.
livecheck do
url :url
regex(/release[._-]v?(\d+(?:\.\d+)+)[._-]version[._-](\d+(?:\.\d+)+)[._-]Macos[._-]#{arch}\.dmg/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]},#{match[2]}"
end
end.flatten
end
end

depends_on macos: ">= :sierra"

app "Coq-Platform~#{version.csv.second.major_minor}~#{version.csv.first.major_minor}.app"
end
22 changes: 0 additions & 22 deletions Casks/c/coqide.rb

This file was deleted.

1 change: 1 addition & 0 deletions cask_renames.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clinq": "sipgate-clinq",
"cloudapp": "zight",
"codewhisperer": "amazon-q",
"coqide": "coq-platform",
"cron": "notion-calendar",
"easy-move-plus-resize": "easy-move+resize",
"emby-server": "embyserver",
Expand Down

0 comments on commit 026f56c

Please sign in to comment.