excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / y / yandex-cloud-cli.rb
blob127488a47fc397e96888e3cefa82cfa646de92ea
1 cask "yandex-cloud-cli" do
2   version "0.140.0"
3   sha256 :no_check
5   url "https://storage.yandexcloud.net/yandexcloud-yc/install.sh",
6       verified: "yandexcloud.net/yandexcloud-yc/"
7   name "Yandex Cloud CLI"
8   desc "CLI for Yandex Cloud"
9   homepage "https://cloud.yandex.com/docs/cli/"
11   livecheck do
12     url "https://storage.yandexcloud.net/yandexcloud-yc/release/stable"
13     regex(/^v?(\d+(?:\.\d+)+)$/i)
14   end
16   installer script: {
17     executable: "install.sh",
18     args:       ["-i", "#{staged_path}/#{token}", "-r", "/dev/null"],
19   }
20   binary "yandex-cloud-cli/bin/docker-credential-yc"
21   binary "yandex-cloud-cli/bin/yc"
22   binary "yandex-cloud-cli/completion.zsh.inc",
23          target: "#{HOMEBREW_PREFIX}/share/zsh/site-functions/_yc"
24   binary "yandex-cloud-cli/completion.bash.inc",
25          target: "#{HOMEBREW_PREFIX}/etc/bash_completion.d/yc"
27   uninstall delete: "#{staged_path}/#{token}"
29   zap trash: "~/.config/yandex-cloud"
31   caveats <<~EOS
32     To install shell completions add this to your profile:
34       for bash users
35         source "#{staged_path}/#{token}/completion.bash.inc"
37       for zsh users
38         source "#{staged_path}/#{token}/completion.zsh.inc"
39   EOS
40 end