Skip to content

Commit 05fdbaa

Browse files
authored
Merge pull request #266171 from l0b0/dependabot-cli
dependabot-cli: init at 1.39.0
2 parents 5014727 + 7381932 commit 05fdbaa

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{ buildGoModule
2+
, dependabot-cli
3+
, fetchFromGitHub
4+
, fetchpatch
5+
, installShellFiles
6+
, lib
7+
, testers
8+
}:
9+
let
10+
pname = "dependabot-cli";
11+
version = "1.39.0";
12+
in
13+
buildGoModule {
14+
inherit pname version;
15+
16+
src = fetchFromGitHub {
17+
owner = "dependabot";
18+
repo = "cli";
19+
rev = "v${version}";
20+
hash = "sha256-QuhgFWF97B72KTX/QKSXNl/4RDAKUMDga7vLYiZw4SM=";
21+
};
22+
23+
vendorHash = "sha256-mNpNp/zeQGgcljj2VhGl4IN1HG1R8CJSTWKzrgC0z44=";
24+
25+
ldflags = [
26+
"-s"
27+
"-w"
28+
"-X github.com/dependabot/cli/cmd/dependabot/internal/cmd.version=v${version}"
29+
];
30+
31+
nativeBuildInputs = [ installShellFiles ];
32+
33+
postInstall = ''
34+
installShellCompletion --cmd dependabot \
35+
--bash <($out/bin/dependabot completion bash) \
36+
--fish <($out/bin/dependabot completion fish) \
37+
--zsh <($out/bin/dependabot completion zsh)
38+
'';
39+
40+
checkFlags = [
41+
"-skip=TestIntegration|TestNewProxy_customCert|TestRun"
42+
];
43+
44+
doInstallCheck = true;
45+
installCheckPhase = ''
46+
$out/bin/dependabot --help
47+
'';
48+
49+
passthru.tests.version = testers.testVersion {
50+
package = dependabot-cli;
51+
command = "dependabot --version";
52+
version = "v${version}";
53+
};
54+
55+
meta = with lib; {
56+
changelog = "https://github.com/dependabot/cli/releases/tag/v${version}";
57+
description = "A tool for testing and debugging Dependabot update jobs";
58+
homepage = "https://github.com/dependabot/cli";
59+
license = licenses.mit;
60+
maintainers = with maintainers; [ l0b0 ];
61+
};
62+
}

0 commit comments

Comments
 (0)