Skip to content

Commit

Permalink
Merge pull request #195307 from Homebrew/update-gitbutler
Browse files Browse the repository at this point in the history
gitbutler: update livecheck
  • Loading branch information
bevanjkay authored Dec 15, 2024
2 parents b6e14d1 + e1d83fb commit 6f57435
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Casks/g/gitbutler.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
cask "gitbutler" do
arch arm: "aarch64", intel: "x86_64"
arch_suffix = on_arch_conditional arm: "aarch64", intel: "x64"

version "0.14.4,1569"
sha256 arm: "623d3b9ebd74bf51738a2fe302d746d92fbe90d59b1da216f5e52538c79519db",
intel: "5788cf37675c164029893753b5a5097121cf8f8b78666cad2760f4329f75581c"
sha256 arm: "6c640676555e3f5ac3dca075e528a3665e7bd400562b516e4fc0808932e6aba5",
intel: "71f61ccb36232c0a7efce2d0c29644d3575d420e2a11f0714d23981d348b54e6"

url "https://releases.gitbutler.com/releases/release/#{version.csv.first}-#{version.csv.second}/macos/#{arch}/GitButler_#{version.csv.first}_#{arch_suffix}.dmg"
url "https://releases.gitbutler.com/releases/release/#{version.csv.first}-#{version.csv.second}/macos/#{arch}/GitButler.app.tar.gz"
name "GitButler"
desc "Git client for simultaneous branches on top of your existing workflow"
homepage "https://gitbutler.com/"

livecheck do
url "https://app.gitbutler.com/downloads/release/darwin/#{arch}/dmg"
regex(%r{/releases/release/(\d+(?:\.\d+)+)[._-](\d+)/macos}i)
strategy :header_match do |headers, regex|
match = headers["location"]&.match(regex)

url "https://app.gitbutler.com/releases/release/darwin-#{arch}/0.0.0"
regex(%r{/release/v?(\d+(?:\.\d+)+)[._-](\d+)/macos}i)
strategy :json do |json, regex|
match = json["url"]&.match(regex)
next if match.blank?

"#{match[1]},#{match[2]}"
Expand Down

0 comments on commit 6f57435

Please sign in to comment.