From 8f03d41831c986741174bf8b8e528d09f266a9e6 Mon Sep 17 00:00:00 2001 From: Tim Klever Date: Fri, 7 Jul 2023 11:57:50 -0700 Subject: [PATCH] feat: allow dynamic configuration of artifact host The change replaces static references to `releases.hashicorp.com` with a configurable environment variable that defaults to `releases.hashicorp.com`. This allows a user to do the following `HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST="https://my.hashicorp.releases.mirror" brew install terraform` and the zip would be retrieved from the host of the user's configuration instead of `releases.hashicorp.com` For those developing in environments with limited or restricted access to the public internet (i.e. behind corporate firewalls), external artifacts like the ones hosted on `releases.hashicorp.com` may often be made available on private systems via mirrors or proxies or rehosted entirely. In these scenarios where direct access to the canonical releases repository is unavailable, to use homebrew successfully with these "hashicorp mirrors", it is a requirement to deploy a MODIFIED fork of this tap repo, swapping the static references to `releases.hashicorp.com` for references to the mirror / proxy / private artifact host. The need for these modifications from the public tap is what I'm trying to eliminate by making these formula more configurable. With this configuration option available, this tap can be pulled into private environments UNMODIFIED, presumably eliminating the need for modifications or any effort to make them. The copywrite formula is a bit of an outlier in this repo. It has a unique artifact host (github releases), and it has a "This file was generated by GoReleaser. DO NOT EDIT." comment at the top. I chose to heed that instruction and left it alone. Willing to hear feedback if there's desire to add another environment variable there. --- Casks/hashicorp-boundary-desktop.rb | 4 +++- Casks/hashicorp-vagrant.rb | 4 +++- Formula/boundary-enterprise.rb | 12 +++++++----- Formula/boundary.rb | 12 +++++++----- Formula/consul-aws.rb | 6 ++++-- Formula/consul-dataplane.rb | 14 ++++++++------ Formula/consul-enterprise.rb | 12 +++++++----- Formula/consul-esm.rb | 12 +++++++----- Formula/consul-k8s.rb | 12 +++++++----- Formula/consul-template.rb | 12 +++++++----- Formula/consul-terraform-sync.rb | 10 ++++++---- Formula/consul.rb | 12 +++++++----- Formula/envconsul.rb | 12 +++++++----- Formula/hc-install.rb | 12 +++++++----- Formula/hcdiag.rb | 12 +++++++----- Formula/levant.rb | 10 ++++++---- Formula/nomad-enterprise.rb | 12 +++++++----- Formula/nomad-pack.rb | 12 +++++++----- Formula/nomad.rb | 12 +++++++----- Formula/packer.rb | 12 +++++++----- Formula/sentinel.rb | 12 +++++++----- Formula/terraform-ls.rb | 12 +++++++----- Formula/terraform.rb | 12 +++++++----- Formula/vagrant.rb | 4 +++- Formula/vault-enterprise.rb | 12 +++++++----- Formula/vault.rb | 12 +++++++----- Formula/vlt.rb | 12 +++++++----- Formula/waypoint.rb | 12 +++++++----- 28 files changed, 180 insertions(+), 124 deletions(-) diff --git a/Casks/hashicorp-boundary-desktop.rb b/Casks/hashicorp-boundary-desktop.rb index e326102b..73243ec9 100644 --- a/Casks/hashicorp-boundary-desktop.rb +++ b/Casks/hashicorp-boundary-desktop.rb @@ -1,11 +1,13 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 +release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + cask "hashicorp-boundary-desktop" do version "1.7.0" sha256 "896613118290c5f7fea4760af84653077e670bb780fd036af78897b5edd5f42f" - url "https://releases.hashicorp.com/boundary-desktop/#{version}/boundary-desktop_#{version}_darwin_amd64.dmg", + url release_repository << "/boundary-desktop/#{version}/boundary-desktop_#{version}_darwin_amd64.dmg", verified: "hashicorp.com/boundary-desktop/" name "Boundary Desktop" desc "" diff --git a/Casks/hashicorp-vagrant.rb b/Casks/hashicorp-vagrant.rb index 8262ef24..8ec31439 100644 --- a/Casks/hashicorp-vagrant.rb +++ b/Casks/hashicorp-vagrant.rb @@ -1,12 +1,14 @@ # Copyright (c) HashiCorp, Inc. # SPDX-License-Identifier: MPL-2.0 +release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + cask "hashicorp-vagrant" do version "2.4.0" arch arm: "arm64", intel: "amd64" sha256 arm: "97806047dfc7e0c3818f946a1c954ab03d8f6d1ae45d1aa43e5bdbd7a8856631", intel: "97806047dfc7e0c3818f946a1c954ab03d8f6d1ae45d1aa43e5bdbd7a8856631" - url "https://releases.hashicorp.com/vagrant/#{version}/vagrant_#{version}_darwin_#{arch}.dmg", + url release_repository << "/vagrant/#{version}/vagrant_#{version}_darwin_#{arch}.dmg", verified: "hashicorp.com/vagrant/" name "Vagrant" desc "Development environment" diff --git a/Formula/boundary-enterprise.rb b/Formula/boundary-enterprise.rb index 3f2cd9a2..0d5ec6e8 100644 --- a/Formula/boundary-enterprise.rb +++ b/Formula/boundary-enterprise.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class BoundaryEnterprise < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Boundary Enterprise" homepage "https://www.boundaryproject.io/" version "0.14.1+ent" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/boundary/0.14.1+ent/boundary_0.14.1+ent_darwin_amd64.zip" + url release_repository << "/boundary/0.14.1+ent/boundary_0.14.1+ent_darwin_amd64.zip" sha256 "c63033a77dee1d550f9174bb1d57ef79b569f3862a5d0b8e5a10dd870b991ea7" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/boundary/0.14.1+ent/boundary_0.14.1+ent_darwin_arm64.zip" + url release_repository << "/boundary/0.14.1+ent/boundary_0.14.1+ent_darwin_arm64.zip" sha256 "50723afa75f462c8f594504b7c223ed7ecb99b091ab6b6e523aa19614752dfe9" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_amd64.zip" + url release_repository << "/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_amd64.zip" sha256 "5add5627e03309eb873866bb2e7344b13939d65c4bdb61c6f6a9edd625c4fb22" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_arm.zip" + url release_repository << "/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_arm.zip" sha256 "0dc4004d9397164aa7d78a10a7e63a7b2118ef48af64de4d3a1f86b365661eb9" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_arm64.zip" + url release_repository << "/boundary/0.14.1+ent/boundary_0.14.1+ent_linux_arm64.zip" sha256 "32358aa7c37bd220ab47fc1a16b9e850dcea09def96eeb3c4c213e03f3cbf644" end diff --git a/Formula/boundary.rb b/Formula/boundary.rb index 6684a0c1..a94c4df3 100644 --- a/Formula/boundary.rb +++ b/Formula/boundary.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Boundary < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Boundary" homepage "https://www.boundaryproject.io/" version "0.14.1" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/boundary/0.14.1/boundary_0.14.1_darwin_amd64.zip" + url release_repository << "/boundary/0.14.1/boundary_0.14.1_darwin_amd64.zip" sha256 "2ab4701fa927d7d59b1f2e4412bb962e4fda00367b9bae9f4732c2593e5f5ff8" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/boundary/0.14.1/boundary_0.14.1_darwin_arm64.zip" + url release_repository << "/boundary/0.14.1/boundary_0.14.1_darwin_arm64.zip" sha256 "e5f9902a0ea72cc02e8e81fa6f37aebebcb01be3fa60ceadecb71008dd405a26" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/boundary/0.14.1/boundary_0.14.1_linux_amd64.zip" + url release_repository << "/boundary/0.14.1/boundary_0.14.1_linux_amd64.zip" sha256 "7e422f4b32bfa24ec57ee9979bd6585b7cc2206c6c54b112c7946586d31e327a" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/boundary/0.14.1/boundary_0.14.1_linux_arm.zip" + url release_repository << "/boundary/0.14.1/boundary_0.14.1_linux_arm.zip" sha256 "d8613e96abdb79ddeb3b9bae7017a6aa3c0a694a572c0fedb5b8430b025051d5" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/boundary/0.14.1/boundary_0.14.1_linux_arm64.zip" + url release_repository << "/boundary/0.14.1/boundary_0.14.1_linux_arm64.zip" sha256 "cfd5a6be55947b7618875bebc055685477300f272a0b45a0463080300b89b57b" end diff --git a/Formula/consul-aws.rb b/Formula/consul-aws.rb index b99fc9a9..56ba82b4 100644 --- a/Formula/consul-aws.rb +++ b/Formula/consul-aws.rb @@ -1,4 +1,6 @@ class ConsulAws < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul AWS" homepage "https://github.com/hashicorp/consul-aws" version "0.1.2" @@ -20,12 +22,12 @@ def caveats end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-aws/0.1.2/consul-aws_0.1.2_linux_amd64.zip" + url release_repository << "/consul-aws/0.1.2/consul-aws_0.1.2_linux_amd64.zip" sha256 "c1a44fd4df8c455a6e4279f83938171087901e17fbff46adbe10c9697fbfb503" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-aws/0.1.2/consul-aws_0.1.2_linux_arm64.zip" + url release_repository << "/consul-aws/0.1.2/consul-aws_0.1.2_linux_arm64.zip" sha256 "16145d50885aeb6d588b9a35ec4492e5e6960f7c68d4d2f16b0581397e5821f2" end diff --git a/Formula/consul-dataplane.rb b/Formula/consul-dataplane.rb index 37f68721..ce660666 100644 --- a/Formula/consul-dataplane.rb +++ b/Formula/consul-dataplane.rb @@ -2,35 +2,37 @@ # SPDX-License-Identifier: MPL-2.0 class ConsulDataplane < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul Dataplane" homepage "https://github.com/hashicorp/consul-dataplane" version "1.2.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-dataplane/1.2.2/consul-dataplane_1.2.2_darwin_amd64.zip" + url release_repository << "/consul-dataplane/1.2.2/consul-dataplane_1.2.2_darwin_amd64.zip" sha256 "d9942976595c365403d0c0c987c0ab90d430cbd8a3052905ac9ccfa33a5e3b5a" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul-dataplane/1.2.2/consul-dataplane_1.2.2_darwin_arm64.zip" + url release_repository << "/consul-dataplane/1.2.2/consul-dataplane_1.2.2_darwin_arm64.zip" sha256 "2b61b5cf2bc40bed0d47d3ac5c23d77aa8ec12ce52c45751d8bb9cb857f18c5d" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_amd64.zip" + url release_repository << "/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_amd64.zip" sha256 "80e8d1fe00b16ebde6a01aef936c11289ef0477c8fcf035b48bdc63124b62728" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_arm.zip" + url release_repository << "/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_arm.zip" sha256 "6ac6bec6bd665fc4b7c90aa1b44420f4ba1624f322fac97ff9eceb4f631ba133" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_arm64.zip" + url release_repository << "/consul-dataplane/1.2.2/consul-dataplane_1.2.2_linux_arm64.zip" sha256 "05bd53dcedebf21c99363677c90043fce96387b194278518ad47f88bd059b486" end - + depends_on "envoy" => :recommended conflicts_with "consul-dataplane" diff --git a/Formula/consul-enterprise.rb b/Formula/consul-enterprise.rb index c2463844..f2ce65b6 100644 --- a/Formula/consul-enterprise.rb +++ b/Formula/consul-enterprise.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class ConsulEnterprise < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul Enterprise" homepage "https://www.consul.io" version "1.16.2+ent" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul/1.16.2+ent/consul_1.16.2+ent_darwin_amd64.zip" + url release_repository << "/consul/1.16.2+ent/consul_1.16.2+ent_darwin_amd64.zip" sha256 "86b64e800f4f0e841084ac8f9e3daa7d67fa64a2a3f906f8897379cfbf8c4b96" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul/1.16.2+ent/consul_1.16.2+ent_darwin_arm64.zip" + url release_repository << "/consul/1.16.2+ent/consul_1.16.2+ent_darwin_arm64.zip" sha256 "bb1b1abecc9cd7faa89a3ad6a91c565c43581353b71cca85dcc81b8d49fa7fd5" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul/1.16.2+ent/consul_1.16.2+ent_linux_amd64.zip" + url release_repository << "/consul/1.16.2+ent/consul_1.16.2+ent_linux_amd64.zip" sha256 "61194a76ba9294069ce4e7ca4a7ad5e920b4aa4ba0d2d5e2378f48f63f2073ba" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul/1.16.2+ent/consul_1.16.2+ent_linux_arm.zip" + url release_repository << "/consul/1.16.2+ent/consul_1.16.2+ent_linux_arm.zip" sha256 "38335a4bf77f97cb5db22bd966aaa22a023d55b5640f29a2ab360feba83ac254" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul/1.16.2+ent/consul_1.16.2+ent_linux_arm64.zip" + url release_repository << "/consul/1.16.2+ent/consul_1.16.2+ent_linux_arm64.zip" sha256 "705461ac4a91ff5e678160bda0aba1b33da33850f75de068ed0065d30496be03" end diff --git a/Formula/consul-esm.rb b/Formula/consul-esm.rb index e8a719ad..c5b18889 100644 --- a/Formula/consul-esm.rb +++ b/Formula/consul-esm.rb @@ -1,30 +1,32 @@ class ConsulEsm < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul ESM" homepage "https://github.com/hashicorp/consul-esm" version "0.7.1" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-esm/0.7.1/consul-esm_0.7.1_darwin_amd64.zip" + url release_repository << "/consul-esm/0.7.1/consul-esm_0.7.1_darwin_amd64.zip" sha256 "017d94d565dc3c4769472978b033be354ded1a1b8baf1230225587e9453ce5bf" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul-esm/0.7.1/consul-esm_0.7.1_darwin_arm64.zip" + url release_repository << "/consul-esm/0.7.1/consul-esm_0.7.1_darwin_arm64.zip" sha256 "746e127366c94b8fc6838c877c41d26df65a1ca4936dbbddd596b4ef3d5622e9" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-esm/0.7.1/consul-esm_0.7.1_linux_amd64.zip" + url release_repository << "/consul-esm/0.7.1/consul-esm_0.7.1_linux_amd64.zip" sha256 "bc1d8c351d277bb1e93d3d2a209b9282ee5d84e3a82ce3c38281f40318b5268f" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-esm/0.7.1/consul-esm_0.7.1_linux_arm.zip" + url release_repository << "/consul-esm/0.7.1/consul-esm_0.7.1_linux_arm.zip" sha256 "01acf7c989820f399effedd75a3bfa189de5e3853b58bb670b070fd9445f8594" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-esm/0.7.1/consul-esm_0.7.1_linux_arm64.zip" + url release_repository << "/consul-esm/0.7.1/consul-esm_0.7.1_linux_arm64.zip" sha256 "47e607ef585fb0f4fdffa9de9364e28ecba7a1c9dc80734d4a20f5744d5a37d8" end diff --git a/Formula/consul-k8s.rb b/Formula/consul-k8s.rb index 1b69fd12..517c96d0 100644 --- a/Formula/consul-k8s.rb +++ b/Formula/consul-k8s.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class ConsulK8s < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul K8s" homepage "https://github.com/hashicorp/consul-k8s" version "1.2.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-k8s/1.2.2/consul-k8s_1.2.2_darwin_amd64.zip" + url release_repository << "/consul-k8s/1.2.2/consul-k8s_1.2.2_darwin_amd64.zip" sha256 "303165dad51150d72d10a42b3c23d220780770ea07306d3d18855dfefe587593" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul-k8s/1.2.2/consul-k8s_1.2.2_darwin_arm64.zip" + url release_repository << "/consul-k8s/1.2.2/consul-k8s_1.2.2_darwin_arm64.zip" sha256 "a614fc0cda1ca790e7f4167bb6d9d9952a5d3c4ac551bcaf3d088c7c17279637" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_amd64.zip" + url release_repository << "/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_amd64.zip" sha256 "1b4e328a8a4c3d2f0f2f3a1733a71ea304d19631b42d511a7a7c3be3c3a1bc18" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_arm.zip" + url release_repository << "/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_arm.zip" sha256 "8bd4d585e2ea09af3199b853ade9ec5adfd2517a664c05a45642f064a3d00803" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_arm64.zip" + url release_repository << "/consul-k8s/1.2.2/consul-k8s_1.2.2_linux_arm64.zip" sha256 "1352c0297466c2e419dac36a8893fb450e3bec732918dd68bded6b6a4ee60687" end diff --git a/Formula/consul-template.rb b/Formula/consul-template.rb index 1b98bb1d..8382d938 100644 --- a/Formula/consul-template.rb +++ b/Formula/consul-template.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class ConsulTemplate < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul Template" homepage "https://github.com/hashicorp/consul-template" version "0.34.0" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-template/0.34.0/consul-template_0.34.0_darwin_amd64.zip" + url release_repository << "/consul-template/0.34.0/consul-template_0.34.0_darwin_amd64.zip" sha256 "d0ae649b1bbe1382a8b6ed0252959bebbaf3f8edd28ae68d267056b0b0d3fae4" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul-template/0.34.0/consul-template_0.34.0_darwin_arm64.zip" + url release_repository << "/consul-template/0.34.0/consul-template_0.34.0_darwin_arm64.zip" sha256 "53b5b84f63487317a1ffde50fba1b92885656c195894a124006985d2957aae6f" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-template/0.34.0/consul-template_0.34.0_linux_amd64.zip" + url release_repository << "/consul-template/0.34.0/consul-template_0.34.0_linux_amd64.zip" sha256 "c7a5817547d6545f8c5ce2dfea62c821ddd324dd9a3414519ebaba2aeeff59a0" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-template/0.34.0/consul-template_0.34.0_linux_arm.zip" + url release_repository << "/consul-template/0.34.0/consul-template_0.34.0_linux_arm.zip" sha256 "5a055fdbdd403b9e68c2ca457c543ebe0b4a4c9af498ff979b206107ced81eb6" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-template/0.34.0/consul-template_0.34.0_linux_arm64.zip" + url release_repository << "/consul-template/0.34.0/consul-template_0.34.0_linux_arm64.zip" sha256 "90638103f9558b6a152af7245b066472b1ad500332e23d4b6dca1a206f89f4d1" end diff --git a/Formula/consul-terraform-sync.rb b/Formula/consul-terraform-sync.rb index 0eeb9530..55d28881 100644 --- a/Formula/consul-terraform-sync.rb +++ b/Formula/consul-terraform-sync.rb @@ -1,10 +1,12 @@ class ConsulTerraformSync < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul Terraform Sync" homepage "https://github.com/hashicorp/consul-terraform-sync" version "0.7.0" if OS.mac? - url "https://releases.hashicorp.com/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_darwin_amd64.zip" + url release_repository << "/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_darwin_amd64.zip" sha256 "dfb11f751de5d8eb5ed19d1aa2ee63a2dda417eea2d900cea6f31ae5b5ea88e6" end @@ -20,17 +22,17 @@ def caveats end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_amd64.zip" + url release_repository << "/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_amd64.zip" sha256 "40bcb6fa6ab043cad6c7e2425a723f0531b1539ec2502ac2d6fc44180df1efb4" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_arm.zip" + url release_repository << "/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_arm.zip" sha256 "25b3b0b220d6ef31f5864d7babeac24c6cfd5e49f25ed773b14a207d2b127e11" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_arm64.zip" + url release_repository << "/consul-terraform-sync/0.7.0/consul-terraform-sync_0.7.0_linux_arm64.zip" sha256 "6b5adba79bbfd059879572007feb8aec47f61d23f78309b92107f3c403f96703" end diff --git a/Formula/consul.rb b/Formula/consul.rb index 9f5051cc..393f45a5 100644 --- a/Formula/consul.rb +++ b/Formula/consul.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Consul < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Consul" homepage "https://www.consul.io" version "1.16.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_darwin_amd64.zip" + url release_repository << "/consul/1.16.2/consul_1.16.2_darwin_amd64.zip" sha256 "47fef801a90ddc32f483141e952723a6e9819edcd9bc9d7f88c1d5d3964b2b6d" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_darwin_arm64.zip" + url release_repository << "/consul/1.16.2/consul_1.16.2_darwin_arm64.zip" sha256 "39a1a07f93f7d37ecf7821cadb117a4071ea704698948bf79f4a61cfcee316ab" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_linux_amd64.zip" + url release_repository << "/consul/1.16.2/consul_1.16.2_linux_amd64.zip" sha256 "2c87fffbb8abb3ba776519514db659f174a7c5b65faad7818457049ca9ff338b" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_linux_arm.zip" + url release_repository << "/consul/1.16.2/consul_1.16.2_linux_arm.zip" sha256 "191a94dd2929f92d885ae0b6ff8a6b987ec6e3a5b15057c21a7b6279a407ae53" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/consul/1.16.2/consul_1.16.2_linux_arm64.zip" + url release_repository << "/consul/1.16.2/consul_1.16.2_linux_arm64.zip" sha256 "1903a5ecb6e17437bb6e0ada5e9ef403fd791ec1130c52cd76508260c4a2a719" end diff --git a/Formula/envconsul.rb b/Formula/envconsul.rb index 8008419c..8f065bc1 100644 --- a/Formula/envconsul.rb +++ b/Formula/envconsul.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Envconsul < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Env Consul" homepage "https://github.com/hashicorp/envconsul" version "0.13.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_darwin_amd64.zip" + url release_repository << "/envconsul/0.13.2/envconsul_0.13.2_darwin_amd64.zip" sha256 "0e08ebedc24511f56c4a5b3f16177767289544b0414e1ee2333ee15a04f3dd7b" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_darwin_arm64.zip" + url release_repository << "/envconsul/0.13.2/envconsul_0.13.2_darwin_arm64.zip" sha256 "a323e17c2d69e38f1c3da7e8c3a0c0d4da3492d20a40fdcdb719556264fc2962" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_linux_amd64.zip" + url release_repository << "/envconsul/0.13.2/envconsul_0.13.2_linux_amd64.zip" sha256 "3a2719ad53e6b180f2accc9cd1b165fdca38a2e11e72504229a1aaaac9e7bd00" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_linux_arm.zip" + url release_repository << "/envconsul/0.13.2/envconsul_0.13.2_linux_arm.zip" sha256 "e98e41a87f409e1a9618872e72ef4bf5d1c03f8517f17baa7745f92d7c7d4305" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/envconsul/0.13.2/envconsul_0.13.2_linux_arm64.zip" + url release_repository << "/envconsul/0.13.2/envconsul_0.13.2_linux_arm64.zip" sha256 "a413d7c6cae56de2b0b7215a64e74ee718a76ad2f9205ce95871340b5d7dfbd9" end diff --git a/Formula/hc-install.rb b/Formula/hc-install.rb index fdec5e5f..75921edd 100644 --- a/Formula/hc-install.rb +++ b/Formula/hc-install.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class HcInstall < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "hc-install CLI" homepage "https://github.com/hashicorp/hc-install" version "0.6.1" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/hc-install/0.6.1/hc-install_0.6.1_darwin_amd64.zip" + url release_repository << "/hc-install/0.6.1/hc-install_0.6.1_darwin_amd64.zip" sha256 "9329cffa3050cb47d7f14de6999e9581efcf5376734aae44a253b129b0786da0" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/hc-install/0.6.1/hc-install_0.6.1_darwin_arm64.zip" + url release_repository << "/hc-install/0.6.1/hc-install_0.6.1_darwin_arm64.zip" sha256 "daa64ee79b4b499bcc400b8480b255603d8e0b505d61500533f33345a808aa5d" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/hc-install/0.6.1/hc-install_0.6.1_linux_amd64.zip" + url release_repository << "/hc-install/0.6.1/hc-install_0.6.1_linux_amd64.zip" sha256 "ab51eff71e9503054d0a1246b116dc46001841f06e56fe9d8e0c197dd00dd565" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/hc-install/0.6.1/hc-install_0.6.1_linux_arm.zip" + url release_repository << "/hc-install/0.6.1/hc-install_0.6.1_linux_arm.zip" sha256 "1943f4173981c71acae499cca6e1ddcda2f81b1e3dcff3bd885de4b2b3e93f6f" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/hc-install/0.6.1/hc-install_0.6.1_linux_arm64.zip" + url release_repository << "/hc-install/0.6.1/hc-install_0.6.1_linux_arm64.zip" sha256 "0eecb645fe2b8f90eb3736608aa40ebff5da6bc251bd153d653829707bd68d97" end diff --git a/Formula/hcdiag.rb b/Formula/hcdiag.rb index c68b0d6b..a86ace48 100644 --- a/Formula/hcdiag.rb +++ b/Formula/hcdiag.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Hcdiag < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Hcdiag" homepage "https://github.com/hashicorp/hcdiag" version "0.5.1" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/hcdiag/0.5.1/hcdiag_0.5.1_darwin_amd64.zip" + url release_repository << "/hcdiag/0.5.1/hcdiag_0.5.1_darwin_amd64.zip" sha256 "be5432b1d8c933bafb2f63df7456501e383052613dea81bb3adee2d636790b48" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/hcdiag/0.5.1/hcdiag_0.5.1_darwin_arm64.zip" + url release_repository << "/hcdiag/0.5.1/hcdiag_0.5.1_darwin_arm64.zip" sha256 "0ec738d2dcbd370c54a7fb2986f1a24998ab6e181e4724255ea8f9a13b356df4" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/hcdiag/0.5.1/hcdiag_0.5.1_linux_amd64.zip" + url release_repository << "/hcdiag/0.5.1/hcdiag_0.5.1_linux_amd64.zip" sha256 "c1be38a9d3c3d4cd46997a63989740c49061918455f40bc5f6bda84683133c90" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/hcdiag/0.5.1/hcdiag_0.5.1_linux_arm.zip" + url release_repository << "/hcdiag/0.5.1/hcdiag_0.5.1_linux_arm.zip" sha256 "9f5b1fab24d365485ad6300c20a75db61d9827ac8dcce4e5d1fe28b294779c60" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/hcdiag/0.5.1/hcdiag_0.5.1_linux_arm64.zip" + url release_repository << "/hcdiag/0.5.1/hcdiag_0.5.1_linux_arm64.zip" sha256 "2c7bddf5f9f70a8f8c9d590a5d1359d5f423af59b3ceeb374d292c3c5417c9ba" end diff --git a/Formula/levant.rb b/Formula/levant.rb index 52c8ca09..5b47a055 100644 --- a/Formula/levant.rb +++ b/Formula/levant.rb @@ -2,12 +2,14 @@ # SPDX-License-Identifier: MPL-2.0 class Levant < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Levant" homepage "https://github.com/hashicorp/levant" version "0.3.3" if OS.mac? - url "https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_darwin_amd64.zip" + url release_repository << "/levant/0.3.3/levant_0.3.3_darwin_amd64.zip" sha256 "da1f7b45a5a10f8d2387ac40aac7eb52c3dbe6606e9948b51ee0efb82f88c165" end @@ -23,17 +25,17 @@ def caveats end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_amd64.zip" + url release_repository << "/levant/0.3.3/levant_0.3.3_linux_amd64.zip" sha256 "630c4c0499fdc0b904be22905e18dcd81350f8011ab1494b23f20d06f192d462" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_arm.zip" + url release_repository << "/levant/0.3.3/levant_0.3.3_linux_arm.zip" sha256 "02c7106dbf788fdc592f30393a44c9fc4103c7ec7b5662eed351425b149e3a7e" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/levant/0.3.3/levant_0.3.3_linux_arm64.zip" + url release_repository << "/levant/0.3.3/levant_0.3.3_linux_arm64.zip" sha256 "e2e3bf5aed271d848d8aac86b4649594b7f9aa1e11aa4612f5b571f97598bba4" end diff --git a/Formula/nomad-enterprise.rb b/Formula/nomad-enterprise.rb index c106a940..cd15bb7d 100644 --- a/Formula/nomad-enterprise.rb +++ b/Formula/nomad-enterprise.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class NomadEnterprise < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Nomad Enterprise" homepage "https://www.nomadproject.io/" version "1.6.2+ent" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad/1.6.2+ent/nomad_1.6.2+ent_darwin_amd64.zip" + url release_repository << "/nomad/1.6.2+ent/nomad_1.6.2+ent_darwin_amd64.zip" sha256 "93ee6c43d7b14b810f64b5fb31e37c98bcac965c6385336f859d614500324b05" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/nomad/1.6.2+ent/nomad_1.6.2+ent_darwin_arm64.zip" + url release_repository << "/nomad/1.6.2+ent/nomad_1.6.2+ent_darwin_arm64.zip" sha256 "03dd8d29d9c6687237088e32f28066e60b9ac970ca25ab20fb0f90eb66b47f94" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_amd64.zip" + url release_repository << "/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_amd64.zip" sha256 "a97996425479d4eb6c4ac3af540194c95d4421db89f890ef411b2f72ac6167b7" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_arm.zip" + url release_repository << "/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_arm.zip" sha256 "ae18b073593fa010937dcb286bc2c8c9f899edc79fc24fda53f64374438bf811" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_arm64.zip" + url release_repository << "/nomad/1.6.2+ent/nomad_1.6.2+ent_linux_arm64.zip" sha256 "26ac04550f06e3ae258c00e720c656037d460bc94f5b0075465ff76e2ee778c7" end diff --git a/Formula/nomad-pack.rb b/Formula/nomad-pack.rb index 522fb76c..6d6650aa 100644 --- a/Formula/nomad-pack.rb +++ b/Formula/nomad-pack.rb @@ -1,30 +1,32 @@ class NomadPack < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Nomad Pack" homepage "https://github.com/hashicorp/nomad-pack" version "0.0.1-techpreview.3" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_darwin_amd64.zip" + url release_repository << "/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_darwin_amd64.zip" sha256 "3a73f692053d4e12c904d782a35d5cab6669cb4a3e9f5398802c1f9fc7050330" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_darwin_arm64.zip" + url release_repository << "/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_darwin_arm64.zip" sha256 "445263a0b55c0978953a75f935b65c45007f548342ac63fc12f5352c610130dc" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_amd64.zip" + url release_repository << "/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_amd64.zip" sha256 "825cbe6f6053ad4eab4bc298a901cb957b6331fdb3db4b6a896e620a2b96f3c3" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_arm.zip" + url release_repository << "/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_arm.zip" sha256 "a91b42ff413b80d6f20954e086ae42b88c3b1e28fee0f057cc6f18967eb9001d" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_arm64.zip" + url release_repository << "/nomad-pack/0.0.1-techpreview.3/nomad-pack_0.0.1-techpreview.3_linux_arm64.zip" sha256 "838236643b8c8f26fe2afddd97ffc13cceaed31538ae6f2be2f46f8d520769cb" end diff --git a/Formula/nomad.rb b/Formula/nomad.rb index 66ae553a..11eb9e3e 100644 --- a/Formula/nomad.rb +++ b/Formula/nomad.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Nomad < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Nomad" homepage "https://www.nomadproject.io/" version "1.6.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad/1.6.2/nomad_1.6.2_darwin_amd64.zip" + url release_repository << "/nomad/1.6.2/nomad_1.6.2_darwin_amd64.zip" sha256 "b9ead8616cdb812628bafe33b2061305c58d5189666f96c83640fadccd1e0920" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/nomad/1.6.2/nomad_1.6.2_darwin_arm64.zip" + url release_repository << "/nomad/1.6.2/nomad_1.6.2_darwin_arm64.zip" sha256 "a45b015c01ad96631dad83959c1533d64afa0414a2de92d3b3166ba8180656a9" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/nomad/1.6.2/nomad_1.6.2_linux_amd64.zip" + url release_repository << "/nomad/1.6.2/nomad_1.6.2_linux_amd64.zip" sha256 "f6f879a359a667a6b1ca4366abd8383d89118dabd0d28af5bbc4721685ff17b8" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad/1.6.2/nomad_1.6.2_linux_arm.zip" + url release_repository << "/nomad/1.6.2/nomad_1.6.2_linux_arm.zip" sha256 "597b902624c56d46ac0279a5a596ee840ac0ddf9f7709c8aee987ab187c241a5" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/nomad/1.6.2/nomad_1.6.2_linux_arm64.zip" + url release_repository << "/nomad/1.6.2/nomad_1.6.2_linux_arm64.zip" sha256 "799c2af0366bf37edfe5b63f068e02b22394cb1406c2cf8150b484cce8c799f7" end diff --git a/Formula/packer.rb b/Formula/packer.rb index 42ea6d2d..5393a157 100644 --- a/Formula/packer.rb +++ b/Formula/packer.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Packer < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Packer" homepage "https://www.packer.io/" version "1.9.4" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/packer/1.9.4/packer_1.9.4_darwin_amd64.zip" + url release_repository << "/packer/1.9.4/packer_1.9.4_darwin_amd64.zip" sha256 "cc7961f98771f61a395bc365fe114f3b1fca0a981135a0b7ba1d66d59bea9c14" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/packer/1.9.4/packer_1.9.4_darwin_arm64.zip" + url release_repository << "/packer/1.9.4/packer_1.9.4_darwin_arm64.zip" sha256 "3777ec24244147a26d71ffa349a965b33905f5cfbd6f6d5ce30c27dd62f208bb" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/packer/1.9.4/packer_1.9.4_linux_amd64.zip" + url release_repository << "/packer/1.9.4/packer_1.9.4_linux_amd64.zip" sha256 "6cd5269c4245aa8c99e551d1b862460d63fe711c58bec618fade25f8492e80d9" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/packer/1.9.4/packer_1.9.4_linux_arm.zip" + url release_repository << "/packer/1.9.4/packer_1.9.4_linux_arm.zip" sha256 "e1343eaf1f87806c63e67b1bb6c218d2cbb18ce74d570c9197441cd4cae6ba67" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/packer/1.9.4/packer_1.9.4_linux_arm64.zip" + url release_repository << "/packer/1.9.4/packer_1.9.4_linux_arm64.zip" sha256 "f00a4fc221b20a166cfac8a63513054775988a068667517bb3edcfab8b1700ba" end diff --git a/Formula/sentinel.rb b/Formula/sentinel.rb index 854c9f92..2e2ff9bf 100644 --- a/Formula/sentinel.rb +++ b/Formula/sentinel.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Sentinel < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "" homepage "https://docs.hashicorp.com/sentinel" version "0.23.1" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/sentinel/0.23.1/sentinel_0.23.1_darwin_amd64.zip" + url release_repository << "/sentinel/0.23.1/sentinel_0.23.1_darwin_amd64.zip" sha256 "3b02b0ac37bdb0f135e08454f42a796f36b5ead9044abffd305c497c8ea4b396" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/sentinel/0.23.1/sentinel_0.23.1_darwin_arm64.zip" + url release_repository << "/sentinel/0.23.1/sentinel_0.23.1_darwin_arm64.zip" sha256 "44ad8edc19ff7fb4f09b073e8cb1790cf2ac0a76e21c33c88edc48f15da21ca6" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/sentinel/0.23.1/sentinel_0.23.1_linux_amd64.zip" + url release_repository << "/sentinel/0.23.1/sentinel_0.23.1_linux_amd64.zip" sha256 "f0fdab98f475a6327e8d1e777c0d575dc88cea81cdaadd632523d0167a283f64" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/sentinel/0.23.1/sentinel_0.23.1_linux_arm.zip" + url release_repository << "/sentinel/0.23.1/sentinel_0.23.1_linux_arm.zip" sha256 "43b4b1cec6b10ff7e359ae8132b9150ce3ff9be547ba54e0dc071d5436978352" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/sentinel/0.23.1/sentinel_0.23.1_linux_arm64.zip" + url release_repository << "/sentinel/0.23.1/sentinel_0.23.1_linux_arm64.zip" sha256 "ade4b41272b810716b938c60433c4bc9af6021e5804e1aff38d59bf26965859a" end diff --git a/Formula/terraform-ls.rb b/Formula/terraform-ls.rb index c0c64509..c0b1a794 100644 --- a/Formula/terraform-ls.rb +++ b/Formula/terraform-ls.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class TerraformLs < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Terraform Language Server" homepage "https://github.com/hashicorp/terraform-ls" version "0.32.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/terraform-ls/0.32.2/terraform-ls_0.32.2_darwin_amd64.zip" + url release_repository << "/terraform-ls/0.32.2/terraform-ls_0.32.2_darwin_amd64.zip" sha256 "d897eced3310db37af584c42a0e9afffda1a1c23ec442c8be5bec665c32d76b7" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/terraform-ls/0.32.2/terraform-ls_0.32.2_darwin_arm64.zip" + url release_repository << "/terraform-ls/0.32.2/terraform-ls_0.32.2_darwin_arm64.zip" sha256 "d16d565394c932ecdc950b278c2310713805c08a8183f84523d65f351af80b44" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_amd64.zip" + url release_repository << "/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_amd64.zip" sha256 "cd3fdacf09e41ea15025df5b881bf3584f4af86ca9d3d757ddc96d12d5f5fbef" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_arm.zip" + url release_repository << "/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_arm.zip" sha256 "285d420b8fa03c65c6f613c0cdd07a97c3f4612068ca237abec9d618a7e357db" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_arm64.zip" + url release_repository << "/terraform-ls/0.32.2/terraform-ls_0.32.2_linux_arm64.zip" sha256 "641c7e90c104ccdef2e9a50c7a1ac1b9146de8aba64385410bba477c0ae16b0c" end diff --git a/Formula/terraform.rb b/Formula/terraform.rb index 4c6dfd29..599479d0 100644 --- a/Formula/terraform.rb +++ b/Formula/terraform.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Terraform < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Terraform" homepage "https://www.terraform.io/" version "1.6.2" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/terraform/1.6.2/terraform_1.6.2_darwin_amd64.zip" + url release_repository << "/terraform/1.6.2/terraform_1.6.2_darwin_amd64.zip" sha256 "361ffd98f0cdee631cb1475688471c5fb8f41bd6a4d8d300f29df384c82d6316" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/terraform/1.6.2/terraform_1.6.2_darwin_arm64.zip" + url release_repository << "/terraform/1.6.2/terraform_1.6.2_darwin_arm64.zip" sha256 "87345e9f2932c29c8d00c5ca9e0361fada18accc2573fd66883b3adb40949be8" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/terraform/1.6.2/terraform_1.6.2_linux_amd64.zip" + url release_repository << "/terraform/1.6.2/terraform_1.6.2_linux_amd64.zip" sha256 "107142241b12ff78b6eb9c419757d406a8714704f7928750a662ba19de055e98" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/terraform/1.6.2/terraform_1.6.2_linux_arm.zip" + url release_repository << "/terraform/1.6.2/terraform_1.6.2_linux_arm.zip" sha256 "b0a5f94cc36b71d0eced8f82ac6a6db7a0e8c9753bf392ab0ddc7cddcd18035f" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/terraform/1.6.2/terraform_1.6.2_linux_arm64.zip" + url release_repository << "/terraform/1.6.2/terraform_1.6.2_linux_arm64.zip" sha256 "ac70f54865d1c0a945d3efa221074e32a3818c666a412148ee5f9f0b14fd330d" end diff --git a/Formula/vagrant.rb b/Formula/vagrant.rb index 1a5e3d8f..1e49d7c4 100644 --- a/Formula/vagrant.rb +++ b/Formula/vagrant.rb @@ -2,12 +2,14 @@ # SPDX-License-Identifier: MPL-2.0 class Vagrant < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Development environment" homepage "https://www.vagrantup.com/" version "2.4.0" if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vagrant/2.4.0/vagrant_2.4.0_linux_amd64.zip" + url release_repository << "/vagrant/2.4.0/vagrant_2.4.0_linux_amd64.zip" sha256 "a638c22f9dd35481a4486bdb0eca614ad695036aa444cc3aace4513d3de0cbbe" end diff --git a/Formula/vault-enterprise.rb b/Formula/vault-enterprise.rb index 67b58ded..be20c475 100644 --- a/Formula/vault-enterprise.rb +++ b/Formula/vault-enterprise.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class VaultEnterprise < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Vault Enterprise" homepage "https://www.vaultproject.io" version "1.15.0+ent" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vault/1.15.0+ent/vault_1.15.0+ent_darwin_amd64.zip" + url release_repository << "/vault/1.15.0+ent/vault_1.15.0+ent_darwin_amd64.zip" sha256 "a5d6cd68b18ca60cf190c0c145a2bbaa14f51cf2647d4bb2615054b12da2442a" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/vault/1.15.0+ent/vault_1.15.0+ent_darwin_arm64.zip" + url release_repository << "/vault/1.15.0+ent/vault_1.15.0+ent_darwin_arm64.zip" sha256 "80ece6b6cc26fef3f9d5b170f84479868a170f5ee54db4e429773f14e011c446" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vault/1.15.0+ent/vault_1.15.0+ent_linux_amd64.zip" + url release_repository << "/vault/1.15.0+ent/vault_1.15.0+ent_linux_amd64.zip" sha256 "7964aca9798a4329cbb3b07834b9e54236a5f02f5f67eb615f2f2bbbba80b8b6" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vault/1.15.0+ent/vault_1.15.0+ent_linux_arm.zip" + url release_repository << "/vault/1.15.0+ent/vault_1.15.0+ent_linux_arm.zip" sha256 "bab95de96aec3e1c8204eae26f7e74cd94e8aee593acbd4862d5833ec83c95e7" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vault/1.15.0+ent/vault_1.15.0+ent_linux_arm64.zip" + url release_repository << "/vault/1.15.0+ent/vault_1.15.0+ent_linux_arm64.zip" sha256 "6398488336be0fa9063c127edac541d6ae9e4d1e8075cfef657ab9dac7c8196a" end diff --git a/Formula/vault.rb b/Formula/vault.rb index a4564ee0..953851df 100644 --- a/Formula/vault.rb +++ b/Formula/vault.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Vault < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Vault" homepage "https://www.vaultproject.io" version "1.15.0" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vault/1.15.0/vault_1.15.0_darwin_amd64.zip" + url release_repository << "/vault/1.15.0/vault_1.15.0_darwin_amd64.zip" sha256 "00183990c3af5e127b755b0af301e188e02833d4b1567e96712d82aa47e9bd7f" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/vault/1.15.0/vault_1.15.0_darwin_arm64.zip" + url release_repository << "/vault/1.15.0/vault_1.15.0_darwin_arm64.zip" sha256 "7f5a5b8ea30521f5bf918a762ba47f1c1fec6934130844643e996e41ff016369" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vault/1.15.0/vault_1.15.0_linux_amd64.zip" + url release_repository << "/vault/1.15.0/vault_1.15.0_linux_amd64.zip" sha256 "b69c209f05c1ccfa012a60090adfca1607c8fad14728a5a208979a1706b6cd46" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vault/1.15.0/vault_1.15.0_linux_arm.zip" + url release_repository << "/vault/1.15.0/vault_1.15.0_linux_arm.zip" sha256 "2bd84fa3719f4f75f389aeccaa2ce7e6104bfaf427328ed124c10d39011602d7" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vault/1.15.0/vault_1.15.0_linux_arm64.zip" + url release_repository << "/vault/1.15.0/vault_1.15.0_linux_arm64.zip" sha256 "59f9349e6897fd0f89790fb81780944cab84f4507aa259494013c24db6d083bb" end diff --git a/Formula/vlt.rb b/Formula/vlt.rb index 22eb4ea8..ace2a6c4 100644 --- a/Formula/vlt.rb +++ b/Formula/vlt.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Vlt < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Vlt CLI" homepage "https://github.com/hashicorp/vlt" version "1.0.0" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vlt/1.0.0/vlt_1.0.0_darwin_amd64.zip" + url release_repository << "/vlt/1.0.0/vlt_1.0.0_darwin_amd64.zip" sha256 "47b0c99cc88fd5e8e0de60f283f86d0f5d9ba46dd10bb4a6c3c6e29eefdfe1db" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/vlt/1.0.0/vlt_1.0.0_darwin_arm64.zip" + url release_repository << "/vlt/1.0.0/vlt_1.0.0_darwin_arm64.zip" sha256 "c6e090f1d93c9977b039281d247aa66d91737ea0767547b20776635aa9eeaa69" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/vlt/1.0.0/vlt_1.0.0_linux_amd64.zip" + url release_repository << "/vlt/1.0.0/vlt_1.0.0_linux_amd64.zip" sha256 "1a7ab59cb16446f39412d85cab24ec729986ca6ac0f7a49d0ae210e279024bf2" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vlt/1.0.0/vlt_1.0.0_linux_arm.zip" + url release_repository << "/vlt/1.0.0/vlt_1.0.0_linux_arm.zip" sha256 "654f987b50f55654daf05d0f644a85ab625bf66282b7b9e9aa883e88b56ef9fd" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/vlt/1.0.0/vlt_1.0.0_linux_arm64.zip" + url release_repository << "/vlt/1.0.0/vlt_1.0.0_linux_arm64.zip" sha256 "e20529046b9a24fac9bc5d271c13db745d181c55ceed285f8d36af61a562143e" end diff --git a/Formula/waypoint.rb b/Formula/waypoint.rb index 0d7dcc58..c185abfe 100644 --- a/Formula/waypoint.rb +++ b/Formula/waypoint.rb @@ -2,32 +2,34 @@ # SPDX-License-Identifier: MPL-2.0 class Waypoint < Formula + release_repository = +ENV["HOMEBREW_HASHICORP_ARTIFACT_REPOSITORY_HOST"] || "https://releases.hashicorp.com" + desc "Waypoint" homepage "https://www.waypointproject.io/" version "0.11.4" if OS.mac? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_darwin_amd64.zip" + url release_repository << "/waypoint/0.11.4/waypoint_0.11.4_darwin_amd64.zip" sha256 "8942a7d00aaf0b39cec05e2f7da8788a2be0f2be0084236d228d031c6e56521f" end if OS.mac? && Hardware::CPU.arm? - url "https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_darwin_arm64.zip" + url release_repository << "/waypoint/0.11.4/waypoint_0.11.4_darwin_arm64.zip" sha256 "c23da6fe2ba4db6f63963ef2e72caa71faae70b4f598d439d6f35d6abb79f557" end if OS.linux? && Hardware::CPU.intel? - url "https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_linux_amd64.zip" + url release_repository << "/waypoint/0.11.4/waypoint_0.11.4_linux_amd64.zip" sha256 "96d314f1bc182a30ca9e93910981fbd4ecf7290763c55d2d4e8ddce2b23abdca" end if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_linux_arm.zip" + url release_repository << "/waypoint/0.11.4/waypoint_0.11.4_linux_arm.zip" sha256 "81f9cb034cd8107dc5972130e379559c384249fe068a00653fc11c3bbb98ca31" end if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://releases.hashicorp.com/waypoint/0.11.4/waypoint_0.11.4_linux_arm64.zip" + url release_repository << "/waypoint/0.11.4/waypoint_0.11.4_linux_arm64.zip" sha256 "bbf331be8785a99a0bfcb4707a013355ba58516d0e9b1b78fd8808e4d2213e66" end