From c60c9825cbbaa0fc82d008eab56d92073cb2c2f0 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:22:37 +1100 Subject: [PATCH] feat(installer): add check for CI in create_installer.sh If in CI, print a message saying so. If not, prompt user to confirm that they are in the correct working directory. --- installer/create_installer.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/installer/create_installer.sh b/installer/create_installer.sh index 868b7770e3..5677bae5a3 100755 --- a/installer/create_installer.sh +++ b/installer/create_installer.sh @@ -28,6 +28,18 @@ VERSION=$( ) VERSION="v${VERSION}" +if [[ ! -z ${CI} ]]; then + echo + echo -e "${BCYAN}CI environment detected${RESET}" + echo +else + echo + echo -e "${BYELLOW}This script must be run from the installer directory!${RESET}" + echo "The current working directory is $(pwd)" + read -p "If that looks right, press any key to proceed, or CTRL-C to exit..." + echo +fi + echo -e "${BGREEN}HEAD${RESET}:" git_show HEAD echo @@ -35,7 +47,6 @@ echo # ---------------------- FRONTEND ---------------------- pushd ../invokeai/frontend/web >/dev/null -echo echo "Installing frontend dependencies..." echo pnpm i --frozen-lockfile