From c19c15f527106aaedd146a93a2d9afb8d54859a2 Mon Sep 17 00:00:00 2001 From: thde Date: Fri, 30 Aug 2024 11:33:33 +0200 Subject: [PATCH] build(brew): auto install completion --- .goreleaser.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 33769bc..61544b5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -66,6 +66,14 @@ brews: description: "Interact with Nine API resources." license: "Apache 2.0" + post_install: | + File.write "nctl.bash", system("nctl", "completions", "-c", "bash") + File.write "nctl.zsh", system("nctl", "completions", "-c", "zsh") + File.write "nctl.fish", system("nctl", "completions", "-c", "fish") + bash_completion.install "nctl.bash" + zsh_completion.install "nctl.zsh" + fish_completion.install "nctl.fish" + # Setting this will prevent goreleaser to actually try to commit the updated # formula - instead, the formula file will be stored on the dist folder only, # leaving the responsibility of publishing it to the user.