From 4661e4519df1e326533a1943143bcb15a62e6de1 Mon Sep 17 00:00:00 2001 From: darklore Date: Thu, 23 Sep 2021 17:17:46 +0900 Subject: [PATCH] Add shell completion installation to homebrew formulae Signed-off-by: Katsunori Tanaka --- .goreleaser.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 09ee2e00..6fbf5550 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -52,6 +52,17 @@ brews: dependencies: - name: kubectl type: optional + install: | + bin.install "flux" + + bash_output = Utils.safe_popen_read(bin/"flux", "completion", "bash") + (bash_completion/"flux").write bash_output + + zsh_output = Utils.safe_popen_read(bin/"flux", "completion", "zsh") + (zsh_completion/"_flux").write zsh_output + + fish_output = Utils.safe_popen_read(bin/"flux", "completion", "fish") + (fish_completion/"flux.fish").write fish_output test: | system "#{bin}/flux --version" publishers: