Skip to content

Commit

Permalink
Don't skip prereleases for Beta livecheck
Browse files Browse the repository at this point in the history
And the default regex works fine for release versions, so we don't need
to have a special one.
  • Loading branch information
michaelblyons authored and woj-tek committed Jul 27, 2023
1 parent b278c0a commit d47e643
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 11 additions & 2 deletions Casks/beagleim-beta.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@

livecheck do
url :url
regex(/^(?:BeagleIM )?v?(\d+\.\d+\.\d+-b\d+)$/i)
strategy :github_releases
regex(/^(\d+\.\d+\(?:.\d+)?-b\d+)$/i)
strategy :github_releases do |json, regex|
json.map do |release|
next if release["draft"] || !release["prerelease"]

match = json["tag_name"]&.match(regex)
next if match.blank?

match[1]
end
end
end

depends_on macos: ">= :catalina"
Expand Down
1 change: 0 additions & 1 deletion Casks/beagleim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

livecheck do
url :url
regex(/^(?:BeagleIM )?v?(\d+\.\d+\.\d+)$/i)
strategy :github_releases
end

Expand Down

0 comments on commit d47e643

Please sign in to comment.