woodpecker-cli: calling woodpecker instead of woodpecker-cli is now deprecated
according to upstream starting with v3.0.0. Previously the opposite was true, so we simply invert the deprecation wrapper added inee4670a821. Ref:3d7e60beb0
This commit is contained in:
@@ -18,6 +18,6 @@ buildGoModule {
|
||||
|
||||
meta = common.meta // {
|
||||
description = "Command line client for the Woodpecker Continuous Integration server";
|
||||
mainProgram = "woodpecker";
|
||||
mainProgram = "woodpecker-cli";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,18 +18,16 @@ in
|
||||
cd $out/bin
|
||||
for f in *; do
|
||||
if [ "$f" = cli ]; then
|
||||
mv -- "$f" "woodpecker"
|
||||
# Issue a warning to the user if they call the deprecated executable
|
||||
cat >woodpecker-cli << EOF
|
||||
cat >woodpecker << EOF
|
||||
#!/bin/sh
|
||||
echo 'WARNING: calling \`woodpecker-cli\` is deprecated, use \`woodpecker\` instead.' >&2
|
||||
$out/bin/woodpecker "\$@"
|
||||
echo 'WARNING: calling \`woodpecker\` is deprecated, use \`woodpecker-cli\` instead.' >&2
|
||||
$out/bin/woodpecker-cli "\$@"
|
||||
EOF
|
||||
chmod +x woodpecker-cli
|
||||
patchShebangs woodpecker-cli
|
||||
else
|
||||
mv -- "$f" "woodpecker-$f"
|
||||
chmod +x woodpecker
|
||||
patchShebangs woodpecker
|
||||
fi
|
||||
mv -- "$f" "woodpecker-$f"
|
||||
done
|
||||
cd -
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user