bin/cli can be called from an endpoint's spec folder
For example, if you git clone --recursive https://tildegit.org/forge/endpoints.php you can cd endpoints.php/spec && ./test_tests_web.sh and it will work
This commit is contained in:
parent
fd0ac6a610
commit
47ee90cd54
7
bin/cli
7
bin/cli
|
@ -1,9 +1,12 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
ORIGDIR="$(pwd)"
|
||||||
SCRIPTDIR="$(dirname "$0")"
|
SCRIPTDIR="$(dirname "$0")"
|
||||||
BASEDIR="$(realpath "$SCRIPTDIR"/..)"
|
BASEDIR="$(realpath "$SCRIPTDIR"/..)"
|
||||||
|
|
||||||
if [ -f "$BASEDIR"/target/release/whck ]; then
|
cd "$BASEDIR"
|
||||||
|
|
||||||
|
if [ -f target/release/whck ]; then
|
||||||
output="$(cargo build --release 2>&1)"
|
output="$(cargo build --release 2>&1)"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
# Build succeeded echo path to binary
|
# Build succeeded echo path to binary
|
||||||
|
@ -21,3 +24,5 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cd "$ORIGDIR"
|
||||||
|
|
Loading…
Reference in New Issue