Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform-rover: add build patch for node v20 and go1.21.0 #139460

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions Formula/terraform-rover.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,39 @@ class TerraformRover < Formula
license "MIT"

bottle do
sha256 cellar: :any_skip_relocation, arm64_ventura: "968e2719282cd29685415ea7e18963d0c4ee9faf08c9d506cb3a15b69d6fb164"
sha256 cellar: :any_skip_relocation, arm64_monterey: "a91f264c414c45431d9f49775405e736d8c98fdad348d2890189491eeaf14509"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "2585975e144bff4b942e06fea9b4a537845506d8753c83cdd0604242f25565cd"
sha256 cellar: :any_skip_relocation, ventura: "06ed2350c1cfb7e24b9a00d414e8bbce8c6f3ed5cc62fc7c01de2dedadd10b18"
sha256 cellar: :any_skip_relocation, monterey: "2fb8acc2af0c3029d217e0143115e34fd9ceca18cb6372053f35fa19a5d1fe15"
sha256 cellar: :any_skip_relocation, big_sur: "bbb836ca74b099587811edbe6806cd87767c543417f4bbc7043ee55fb00a9d3e"
sha256 cellar: :any_skip_relocation, catalina: "cb3ea8a62a309585e40a3ebca0f8633de15d80acfaed963046591d4ad1d610bf"
sha256 cellar: :any_skip_relocation, x86_64_linux: "7352915d9f3322d4795ee475095c00c2cc6c3f206501f00194b9a9f251add4c9"
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_ventura: "1818e26e098b7c82f51fae7441e753503c7e4a75276d251febef3d4857f0c6d1"
sha256 cellar: :any_skip_relocation, arm64_monterey: "565e31665caca943d71cc52d6c7b59b688fa54f02455091f7c6770bae0742a4a"
sha256 cellar: :any_skip_relocation, arm64_big_sur: "a438136c2b7532ebda2f4d03b932e447b15c9f30ca81eabac463578ed4b72ad9"
sha256 cellar: :any_skip_relocation, ventura: "4931a68ebe6dae34d3d55d53dacfadcb42467f09dd4716459dbb4ab37dc74984"
sha256 cellar: :any_skip_relocation, monterey: "a68c002a32b05deaa61a950e2fbf62ea55ba2cdd5836314e0014c9f8cea09e10"
sha256 cellar: :any_skip_relocation, big_sur: "b5e72acca059507deef119a07073f60d8a4183fdb59393412fd2353b4eb6d41d"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b078227fb4f38d09892b8ff73db1cb786940ef8dbb850e2f75c7c79d4688c882"
end

depends_on "go" => :build
depends_on "node"
depends_on "terraform"

# build patch for building with node 20 and go 1.21.0
# fix `Error: error:0308010C:digital envelope routines::unsupported` error
# upstream patch PR, https://github.com/im2nguyen/rover/pull/128
patch do
url "https://github.com/im2nguyen/rover/commit/8f5c9ca2ca6294c6a0463199ace822335c780041.patch?full_index=1"
sha256 "c13464fe2de234ab670e58cd9f8999d23b088260927797708ce00bd5a11ce821"
end
patch do
url "https://github.com/im2nguyen/rover/commit/989802276f74c57406a6b23a8d7ccc470fcdc975.patch?full_index=1"
sha256 "3550755a11358385000f1a6af96a305c3f49690949d079d8e4fd59b8d17a06f5"
end

def install
Language::Node.setup_npm_environment
cd "ui" do
system "npm", "install", *Language::Node.local_npm_install_args
system "npm", "run", "build"
end
system "go", "build", *std_go_args
system "go", "build", *std_go_args(ldflags: "-s -w")
end

test do
Expand All @@ -38,5 +50,7 @@ def install
EOS
system bin/"terraform-rover", "-standalone", "-tfPath", Formula["terraform"].bin/"terraform"
assert_predicate testpath/"rover.zip", :exist?

assert_match version.to_s, shell_output("#{bin}/terraform-rover --version")
end
end
Loading