From 299fff9aee53ccad32e934f8b0f5220fa81fbbf3 Mon Sep 17 00:00:00 2001 From: aireilly Date: Fri, 12 Jan 2024 17:12:38 +0000 Subject: [PATCH] disable manual preview if travis is not in use --- scripts/manualpreview.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/manualpreview.sh b/scripts/manualpreview.sh index 454fd9bec0..f959e28ed3 100755 --- a/scripts/manualpreview.sh +++ b/scripts/manualpreview.sh @@ -2,6 +2,14 @@ set -e +git_root=$(git rev-parse --show-toplevel) + +# Exit if Travis is not being used +if [ -f "${git_root}/.travis.yml.old" ]; then + echo "Travis CI is not in use. Exiting..." + exit 0 +fi + # Check if jq is installed hash jq 2>/dev/null || { echo >&2 "Error: jq is not installed. Please install jq before running this script."; exit 1; }