mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
dependabot-cli improvements (#354085)
This commit is contained in:
commit
49f64e9d83
@ -1,12 +1,13 @@
|
||||
{
|
||||
buildGoModule,
|
||||
dependabot-cli,
|
||||
dockerTools,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
lib,
|
||||
testers,
|
||||
dockerTools,
|
||||
makeWrapper,
|
||||
symlinkJoin,
|
||||
testers,
|
||||
}:
|
||||
let
|
||||
pname = "dependabot-cli";
|
||||
@ -65,13 +66,6 @@ buildGoModule {
|
||||
--bash <($out/bin/dependabot completion bash) \
|
||||
--fish <($out/bin/dependabot completion fish) \
|
||||
--zsh <($out/bin/dependabot completion zsh)
|
||||
|
||||
# Create a wrapper that pins the docker images that are depended upon
|
||||
makeWrapper $out/bin/dependabot $out/bin/dependabot-pinned \
|
||||
--run "docker load --input ${updateJobProxy}" \
|
||||
--add-flags "--proxy-image=dependabot-update-job-proxy:${tag}" \
|
||||
--run "docker load --input ${updaterGitHubActions}" \
|
||||
--add-flags "--updater-image=dependabot-updater-github-actions:${tag}"
|
||||
'';
|
||||
|
||||
checkFlags = [
|
||||
@ -83,6 +77,20 @@ buildGoModule {
|
||||
$out/bin/dependabot --help
|
||||
'';
|
||||
|
||||
passthru.withDockerImages = symlinkJoin {
|
||||
name = "dependabot-cli-with-docker-images";
|
||||
paths = [ dependabot-cli ];
|
||||
buildInputs = [ makeWrapper ];
|
||||
postBuild = ''
|
||||
# Create a wrapper that pins the docker images that are depended upon
|
||||
wrapProgram $out/bin/dependabot \
|
||||
--run "docker load --input ${updateJobProxy} >&2" \
|
||||
--add-flags "--proxy-image=dependabot-update-job-proxy:${tag}" \
|
||||
--run "docker load --input ${updaterGitHubActions} >&2" \
|
||||
--add-flags "--updater-image=dependabot-updater-github-actions:${tag}"
|
||||
'';
|
||||
};
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = dependabot-cli;
|
||||
command = "dependabot --version";
|
||||
|
Loading…
Reference in New Issue
Block a user