From ee4670a8210d326e2de4f38f5cb7e87b24bd2264 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 13 Feb 2024 11:14:35 +0000 Subject: [PATCH] woodpecker-cli: add deprecation wrapper --- .../tools/continuous-integration/woodpecker/common.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/tools/continuous-integration/woodpecker/common.nix b/pkgs/development/tools/continuous-integration/woodpecker/common.nix index 584152223b21..b8fb8b871c64 100644 --- a/pkgs/development/tools/continuous-integration/woodpecker/common.nix +++ b/pkgs/development/tools/continuous-integration/woodpecker/common.nix @@ -19,6 +19,14 @@ in 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 + #/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