mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
Merge pull request #287842 from ambroisie/woodpecker-cli
woodpecker: use upstream naming for cli executable
This commit is contained in:
commit
89653a03e0
@ -12,6 +12,6 @@ buildGoModule {
|
||||
|
||||
meta = common.meta // {
|
||||
description = "Command line client for the Woodpecker Continuous Integration server";
|
||||
mainProgram = "woodpecker-cli";
|
||||
mainProgram = "woodpecker";
|
||||
};
|
||||
}
|
||||
|
@ -17,7 +17,19 @@ in
|
||||
postInstall = ''
|
||||
cd $out/bin
|
||||
for f in *; do
|
||||
mv -- "$f" "woodpecker-$f"
|
||||
if [ "$f" = cli ]; then
|
||||
mv -- "$f" "woodpecker"
|
||||
# Issue a warning to the user if they call the deprecated executable
|
||||
cat >woodpecker-cli << EOF
|
||||
#/bin/sh
|
||||
echo 'WARNING: calling `woodpecker-cli` is deprecated, use `woodpecker` instead.' >&2
|
||||
$out/bin/woodpecker "\$@"
|
||||
EOF
|
||||
chmod +x woodpecker-cli
|
||||
patchShebangs woodpecker-cli
|
||||
else
|
||||
mv -- "$f" "woodpecker-$f"
|
||||
fi
|
||||
done
|
||||
cd -
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user