Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor some CI scripts #6276

Merged
merged 6 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
launchdev.sh: add some safety checks
  • Loading branch information
cognifloyd committed Nov 12, 2024
commit a92df9f68795bfcbdb091745f89e6bf8defc34ca
11 changes: 9 additions & 2 deletions tools/launchdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,17 @@ function init()
else
ST2_REPO=${CURRENT_DIR}/${COMMAND_PATH}/..
fi
ST2_REPO=$(readlink -f ${ST2_REPO})
ST2_LOGS="${ST2_REPO}/logs"
# ST2_REPO/virtualenv is the Makefile managed dir.
# The workflow should set this to use a pants exported or other venv instead.
VIRTUALENV=${VIRTUALENV_DIR:-${ST2_REPO}/virtualenv}
VIRTUALENV=$(readlink -f ${VIRTUALENV})
PY=${VIRTUALENV}/bin/python
if [ ! -f "${PY}" ]; then
eecho "${PY} does not exist"
exit 1
fi
PYTHON_VERSION=$(${PY} --version 2>&1)

echo -n "Using virtualenv: "; iecho "${VIRTUALENV}"
Expand Down Expand Up @@ -218,9 +225,9 @@ function st2start()
fi

# activate virtualenv to set PYTHONPATH
source ${VIRTUALENV}/bin/activate
source "${VIRTUALENV}/bin/activate"
# set configuration file location.
export ST2_CONFIG_PATH=${ST2_CONF};
export ST2_CONFIG_PATH="${ST2_CONF}"

# Kill existing st2 terminal multiplexor sessions
for tmux_session in $(tmux ls 2>/dev/null | awk -F: '/^st2-/ {print $1}')
Expand Down