Skip to content

Commit

Permalink
Update abq api to use cloud host
Browse files Browse the repository at this point in the history
  • Loading branch information
tonywok committed Jan 5, 2024
1 parent bcad417 commit 77dc9e4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Formula/abq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ class Abq < Formula
version "1.6.3"

if OS.mac? && Hardware::CPU.intel?
url "https://abq.build/api/downloads/#{version}?os=darwin&arch=x86-64", user_agent: :fake
url "https://cloud.rwx.com/abq/api/downloads/#{version}?os=darwin&arch=x86-64", user_agent: :fake
sha256 "e1618b74a15340ba0503ed83b592ef6da8e2b6d39231baabb1507ad95370578c"
end

if OS.mac? && Hardware::CPU.arm?
url "https://abq.build/api/downloads/#{version}?os=darwin&arch=aarch64", user_agent: :fake
url "https://cloud.rwx.com/abq/api/downloads/#{version}?os=darwin&arch=aarch64", user_agent: :fake
sha256 "9bf2086f087c93e94461c12711f52bb0eb316df693367d91169aac4b5a707802"
end

Expand Down
4 changes: 2 additions & 2 deletions Formula/abq@1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ class AbqAT1 < Formula
version "1.6.3"

if OS.mac? && Hardware::CPU.intel?
url "https://abq.build/api/downloads/#{version}?os=darwin&arch=x86-64", user_agent: :fake
url "https://cloud.rwx.com/abq/api/downloads/#{version}?os=darwin&arch=x86-64", user_agent: :fake
sha256 "e1618b74a15340ba0503ed83b592ef6da8e2b6d39231baabb1507ad95370578c"
end

if OS.mac? && Hardware::CPU.arm?
url "https://abq.build/api/downloads/#{version}?os=darwin&arch=aarch64", user_agent: :fake
url "https://cloud.rwx.com/abq/api/downloads/#{version}?os=darwin&arch=aarch64", user_agent: :fake
sha256 "9bf2086f087c93e94461c12711f52bb0eb316df693367d91169aac4b5a707802"
end

Expand Down
8 changes: 4 additions & 4 deletions bin/update-abq-formulae
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ function getSHA() {
}

echo "Calculating the SHA256 of the binaries"
oldAarch64SHA=$(getSHA "https://abq.build/api/downloads/${oldVersion}?os=darwin&arch=aarch64" "${oldVersion}")
oldX8664SHA=$(getSHA "https://abq.build/api/downloads/${oldVersion}?os=darwin&arch=x86-64" "${oldVersion}")
newAarch64SHA=$(getSHA "https://abq.build/api/downloads/${newVersion}?os=darwin&arch=aarch64" "${newVersion}")
newX8664SHA=$(getSHA "https://abq.build/api/downloads/${newVersion}?os=darwin&arch=x86-64" "${newVersion}")
oldAarch64SHA=$(getSHA "https://cloud.rwx.com/abq/api/downloads/${oldVersion}?os=darwin&arch=aarch64" "${oldVersion}")
oldX8664SHA=$(getSHA "https://cloud.rwx.com/abq/api/downloads/${oldVersion}?os=darwin&arch=x86-64" "${oldVersion}")
newAarch64SHA=$(getSHA "https://cloud.rwx.com/abq/api/downloads/${newVersion}?os=darwin&arch=aarch64" "${newVersion}")
newX8664SHA=$(getSHA "https://cloud.rwx.com/abq/api/downloads/${newVersion}?os=darwin&arch=x86-64" "${newVersion}")

echo "Updating formulae and tests"
sed -i '' -e "s/version \"${oldVersion}\"/version \"${newVersion}\"/" "./Formula/abq.rb"
Expand Down

0 comments on commit 77dc9e4

Please sign in to comment.