Unverified Commit 11fdcc5b authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #189816 from superherointj/package-qovery-cli-add-shell-completion

qovery-cli: add version test and shell completion
parents 3871006f 6d492c33
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
{ lib
, buildGoModule
{ buildGoModule
, fetchFromGitHub
, installShellFiles
, lib
, qovery-cli
, testers
}:

buildGoModule rec {
@@ -16,6 +19,20 @@ buildGoModule rec {

  vendorSha256 = "sha256-4TY7/prMbvw5zVPJRoMLg7Omrxvh1HPGsdz1wqPn4uU=";

  nativeBuildInputs = [ installShellFiles ];

  postInstall = ''
    installShellCompletion --cmd ${pname} \
      --bash <($out/bin/${pname} completion bash) \
      --fish <($out/bin/${pname} completion fish) \
      --zsh <($out/bin/${pname} completion zsh)
  '';

  passthru.tests.version = testers.testVersion {
    package = qovery-cli;
    command = "HOME=$(mktemp -d); ${pname} version";
  };

  meta = with lib; {
    description = "Qovery Command Line Interface";
    homepage = "https://github.com/Qovery/qovery-cli";