refactor. pre-deploy

This commit is contained in:
2025-10-29 20:22:35 +09:00
parent 18497d4343
commit 367e1c932e
113 changed files with 8245 additions and 67 deletions

View File

@@ -1,5 +1,5 @@
# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly
# You cannot run it directly
deactivate () {
# reset old environment variables
@@ -14,12 +14,9 @@ deactivate () {
unset _OLD_VIRTUAL_PYTHONHOME
fi
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
hash -r 2> /dev/null
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
@@ -38,8 +35,15 @@ deactivate () {
# unset irrelevant variables
deactivate nondestructive
VIRTUAL_ENV=/home/trevor/links/.venv
export VIRTUAL_ENV
# on Windows, a path can contain colons and backslashes and has to be converted:
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
# transform D:\path\to\venv to /d/path/to/venv on MSYS
# and to /cygdrive/d/path/to/venv on Cygwin
export VIRTUAL_ENV=$(cygpath /home/data/links/.venv)
else
# use the path as-is
export VIRTUAL_ENV=/home/data/links/.venv
fi
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/"bin":$PATH"
@@ -61,9 +65,6 @@ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
export VIRTUAL_ENV_PROMPT
fi
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
hash -r 2> /dev/null