From ca17a180998aa420a48bfc86a0bf989630c3d9b2 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Fri, 13 Dec 2024 12:42:06 +0100 Subject: [PATCH] chore: allow passing custom targets for COPYRIGHT script Signed-off-by: Tomas Dvorak --- scripts/copyright.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/copyright.sh b/scripts/copyright.sh index 2461b506..4c714a29 100755 --- a/scripts/copyright.sh +++ b/scripts/copyright.sh @@ -15,6 +15,8 @@ set -e +TARGETS=(${TARGETS:-src dist tests scripts}) + # Path to the package.json file PACKAGE_JSON_PATH="./package.json" @@ -42,9 +44,9 @@ if ! command -v nwa &> /dev/null && command -v go &> /dev/null; then fi if command -v nwa &> /dev/null; then - nwa add -l apache -c "$AUTHOR" src dist tests scripts + nwa add -l apache -c "$AUTHOR" "${TARGETS[@]}" elif command -v docker &> /dev/null; then - docker run --rm -v "${PWD}:/src" ghcr.io/b1nary-gr0up/nwa:main add -l apache -c "$AUTHOR" src dist tests scripts + docker run --rm -v "${PWD}:/src" ghcr.io/b1nary-gr0up/nwa:main add -l apache -c "$AUTHOR" "${TARGETS[@]}" else echo "Error: 'nwa' is not available. Either install it manually or install go/docker." exit 1