Skip to content

Commit

Permalink
transmission@nightly: update version, livecheck
Browse files Browse the repository at this point in the history
File names for nightly `transmission` releases only include a hash
but we also need the build number to be able to use a fully-versioned
URL. Using a `lastSuccessfulBuild` dmg URL would result in a 404 (Not
Found) response when the next build occurs, as the expected file
won't be available anymore. With that in mind, we need to use a
build-specific dmg URL.

This updates the cask to include the build number in the `version`
and to capture that information in the `livecheck` block regex.
Unfortunately the dmg URL on the `lastSuccessfulBuild` page doesn't
use a build number but we can identify the build number from other
areas of the page.
  • Loading branch information
samford committed Sep 25, 2024
1 parent 2ae49cf commit 1275931
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Casks/t/[email protected]
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
cask "transmission@nightly" do
version "ed2c6c4085"
version "9662,ed2c6c4085"
sha256 "7b705f4fcad1a200f6327c363c8ce8cdb923dd7ac08dbb22a87260f9199282a0"

url "https://build.transmissionbt.com/job/trunk-mac/lastSuccessfulBuild/artifact/release/Transmission-#{version}.dmg"
url "https://build.transmissionbt.com/job/trunk-mac/#{version.csv.first}/artifact/release/Transmission-#{version.csv.second}.dmg"
name "Transmission"
desc "Open-source BitTorrent client"
homepage "https://transmissionbt.com/"

livecheck do
url "https://build.transmissionbt.com/job/trunk-mac/lastSuccessfulBuild/artifact/release/"
regex(/href=.*?Transmission[._-]([a-f0-9]+)\.dmg/i)
regex(/>\s*\#(\d+)\s*<.+?href=.*?Transmission[._-](\h+)\.dmg/im)
strategy :page_match do |page, regex|
page.scan(regex).map { |match| "#{match[0]},#{match[1]}" }
end
end

deprecate! date: "2025-05-01", because: :unsigned
Expand Down

0 comments on commit 1275931

Please sign in to comment.