Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion queries/cdmq/add-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ if ! command -v npm >/dev/null 2>&1; then
exit 1
fi
echo "Resolving cdmq dependencies..." >&2
npm install --no-fund --no-audit 2>&1 | tail -1 >&2
npm_output=$(npm install --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm install failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1 >&2
node ./add-run.js "$@"
rc=$?
popd >/dev/null
Expand Down
10 changes: 9 additions & 1 deletion queries/cdmq/delete-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ if ! command -v npm >/dev/null 2>&1; then
exit 1
fi
echo "Resolving cdmq dependencies..." >&2
npm install --no-fund --no-audit 2>&1 | tail -1 >&2
npm_output=$(npm install --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm install failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1 >&2
node ./delete-run.js "$@"
rc=$?
popd >/dev/null
Expand Down
10 changes: 9 additions & 1 deletion queries/cdmq/get-metric-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ if ! command -v npm >/dev/null 2>&1; then
exit 1
fi
echo "Resolving cdmq dependencies..." >&2
npm install --no-fund --no-audit 2>&1 | tail -1 >&2
npm_output=$(npm install --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm install failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1 >&2
node ./get-metric-data.js "$@"
rc=$?
popd >/dev/null
Expand Down
10 changes: 9 additions & 1 deletion queries/cdmq/get-primary-periods.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ if ! command -v npm >/dev/null 2>&1; then
exit 1
fi
echo "Resolving cdmq dependencies..." >&2
npm install --no-fund --no-audit 2>&1 | tail -1 >&2
npm_output=$(npm install --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm install failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1 >&2
node ./get-primary-periods.js "$@"
rc=$?
popd >/dev/null
Expand Down
10 changes: 9 additions & 1 deletion queries/cdmq/get-result-summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ if ! command -v npm >/dev/null 2>&1; then
exit 1
fi
echo "Resolving cdmq dependencies..." >&2
npm install --no-fund --no-audit 2>&1 | tail -1 >&2
npm_output=$(npm install --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm install failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1 >&2
node ./get-result-summary.js "$@"
rc=$?
popd >/dev/null
Expand Down
21 changes: 19 additions & 2 deletions queries/cdmq/start-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ fi
# Install dependencies only when package-lock.json is newer than last install
if [ ! -f "node_modules/.install-stamp" ] || [ "package-lock.json" -nt "node_modules/.install-stamp" ]; then
echo "Installing cdmq dependencies..."
npm ci --no-fund --no-audit 2>&1 | tail -1
npm_output=$(npm ci --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: npm ci failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1
touch node_modules/.install-stamp
else
echo "cdmq dependencies up to date"
Expand All @@ -35,7 +43,16 @@ if [ -d "web-ui" ] && [ -f "web-ui/package.json" ]; then
pushd web-ui >/dev/null
if [ ! -f "node_modules/.install-stamp" ] || [ "package-lock.json" -nt "node_modules/.install-stamp" ]; then
echo "Installing web UI dependencies..."
npm ci --no-fund --no-audit 2>&1 | tail -1
npm_output=$(npm ci --no-fund --no-audit 2>&1)
npm_rc=$?
if [ $npm_rc -ne 0 ]; then
echo "ERROR: web UI npm ci failed (rc=$npm_rc):" >&2
echo "$npm_output" >&2
popd >/dev/null
popd >/dev/null
exit 1
fi
echo "$npm_output" | tail -1
touch node_modules/.install-stamp
fi
# Rebuild if any source file is newer than the dist
Expand Down
Loading