From 0f0805e5ce43a4c65b5b1871800fb36ca98fdfd0 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 28 Aug 2024 17:14:20 -0400 Subject: [PATCH] gollum: work around missing dependency repo --- Formula/g/gollum.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/g/gollum.rb b/Formula/g/gollum.rb index 24b02eee4dafb..3beef0d1f47c0 100644 --- a/Formula/g/gollum.rb +++ b/Formula/g/gollum.rb @@ -24,6 +24,16 @@ class Gollum < Formula depends_on "go" => :build def install + # Work around https://github.com/trivago/gollum/issues/265 + mod = "github.com/CrowdStrike/go-metrics-prometheus" + (buildpath/"vendor/#{mod}/go.mod").write <<~EOS + module #{mod} + EOS + (buildpath/"go.work").write <<~EOS + use . + replace #{mod} => ./vendor/#{mod} + EOS + system "go", "build", "-mod=readonly", *std_go_args(ldflags: "-s -w -X gollum/core.versionString=#{version}") end