From abc71184c8cd9d690e3f7ea91cdee93adea60186 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Sun, 20 Sep 2020 20:47:39 +0200 Subject: [PATCH] cleanup scripts use git command instead of some random realpath that is not installed everywhere --- scripts/build.sh | 4 ---- scripts/lint.sh | 5 ++--- scripts/test.sh | 5 ++--- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index 31f491d..3b74a9e 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,10 +1,6 @@ #!/bin/bash set -e -TARGET_DIR="$(pwd)" - -# INFO: This script is always run from the individual package. - node="yarn node" tsdxArgs=() diff --git a/scripts/lint.sh b/scripts/lint.sh index 78637ba..a547db9 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,8 +1,7 @@ #!/bin/bash set -e -SCRIPTS_DIR="$(dirname "${BASH_SOURCE[0]}")" -ROOT_DIR="$(realpath $SCRIPTS_DIR/..)/" +ROOT_DIR="$(git rev-parse --show-toplevel)/" TARGET_DIR="$(pwd)" RELATIVE_TARGET_DIR="${TARGET_DIR/$ROOT_DIR/}" @@ -26,4 +25,4 @@ tsdxArgs+=($@) # Execute $node "$(yarn bin tsdx)" "${tsdxArgs[@]}" -popd > /dev/null \ No newline at end of file +popd > /dev/null diff --git a/scripts/test.sh b/scripts/test.sh index 099b719..87aec59 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,8 +1,7 @@ #!/bin/bash set -e -SCRIPTS_DIR="$(dirname "${BASH_SOURCE[0]}")" -ROOT_DIR="$(realpath $SCRIPTS_DIR/..)/" +ROOT_DIR="$(git rev-parse --show-toplevel)/" TARGET_DIR="$(pwd)" RELATIVE_TARGET_DIR="${TARGET_DIR/$ROOT_DIR/}" @@ -32,4 +31,4 @@ tsdxArgs+=($@) # Execute $node "$(yarn bin tsdx)" "${tsdxArgs[@]}" -popd > /dev/null \ No newline at end of file +popd > /dev/null