Skip to content

Commit 258f619

Browse files
authored
Merge pull request #200003 from Homebrew/plow-completion
plow: update go build and add completion support
2 parents 4302149 + abd2845 commit 258f619

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

Formula/p/plow.rb

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,28 @@ class Plow < Formula
66
license "Apache-2.0"
77

88
bottle do
9-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "6db555ff421189e4d1946e51769dc7644a7aa86058128d4a43d27a35d0fa07d1"
10-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e8d23de67c0cd505bf7e708902d4653aa076906dd4dca7ecc96178edef5e96d8"
11-
sha256 cellar: :any_skip_relocation, arm64_ventura: "11c30ecb6a22b06e66440b72505506dc53b0e88e93a6c78aa6431ec01c695a7a"
12-
sha256 cellar: :any_skip_relocation, arm64_monterey: "95bcacbe5e2365ee02b20f50b0609284ec45c16735bf770e3d4d1e9780855456"
13-
sha256 cellar: :any_skip_relocation, arm64_big_sur: "f0cef52ae418363789cabb8e8ebf61e0ed8b3e1583c2c824021af33e23d9adff"
14-
sha256 cellar: :any_skip_relocation, sonoma: "1bc309224782f699a1a6724fef836b52e4b00742d2d02544114ddc64ee2b3cc5"
15-
sha256 cellar: :any_skip_relocation, ventura: "4e044135f1da21cfe2ea2d2148ac796f6b5eb5945ddd1975e2efd65f0c5d967c"
16-
sha256 cellar: :any_skip_relocation, monterey: "c7964c4b495698886328bfd10dd83c5295fe25e3c704725954713e7a0c46aff0"
17-
sha256 cellar: :any_skip_relocation, big_sur: "bf726164d5c53c61efdd3087164201ebd3b8232a18dee414edd691a53b514f1b"
18-
sha256 cellar: :any_skip_relocation, catalina: "e3b8f6c2f84ab9b4d2bff2087c7daf59143f98141dac1d4d56e466a9c0839b1f"
19-
sha256 cellar: :any_skip_relocation, x86_64_linux: "43f1369e3579ddb48a31eb7b987543ee4dfdcc56d79238462c1285b91727c313"
9+
rebuild 1
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "2b9c5d2de7997a3f2c6808cdddaf777f87e768da1c236cd41c66da552e39096c"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "2b9c5d2de7997a3f2c6808cdddaf777f87e768da1c236cd41c66da552e39096c"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "2b9c5d2de7997a3f2c6808cdddaf777f87e768da1c236cd41c66da552e39096c"
13+
sha256 cellar: :any_skip_relocation, sonoma: "ee01081eb578e285218f45235155d9087af4155de076de009f71ef59442ea33c"
14+
sha256 cellar: :any_skip_relocation, ventura: "ee01081eb578e285218f45235155d9087af4155de076de009f71ef59442ea33c"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "ab525ddecde654379ca9f0d39daf617c981306016c4b71767146a24d92a0492d"
2016
end
2117

2218
depends_on "go" => :build
2319

2420
def install
25-
system "go", "build", *std_go_args
21+
system "go", "build", *std_go_args(ldflags: "-s -w")
22+
23+
generate_completions_from_executable(bin/"plow", shell_parameter_format: "--completion-script-",
24+
shells: [:bash, :zsh])
2625
end
2726

2827
test do
2928
output = "2xx"
3029
assert_match output.to_s, shell_output("#{bin}/plow -n 1 https://httpbin.org/get")
30+
31+
assert_match version.to_s, shell_output("#{bin}/plow --version")
3132
end
3233
end

0 commit comments

Comments
 (0)