ci: check shell script format
This commit is contained in:
@@ -44,8 +44,7 @@ function configureEnv() {
|
||||
}
|
||||
|
||||
function checkConnection() {
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/check_connection.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/check_connection.py
|
||||
}
|
||||
|
||||
function checkConfigExists() {
|
||||
@@ -88,12 +87,10 @@ case "$1" in
|
||||
LOAD_CONFIG_FILE="-c /home/frappe/frappe-bench/commands/gevent_patch.py"
|
||||
|
||||
if [[ -n "${AUTO_MIGRATE}" ]]; then
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/auto_migrate.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/auto_migrate.py
|
||||
fi
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
gunicorn ${LOAD_CONFIG_FILE} -b 0.0.0.0:${FRAPPE_PORT} \
|
||||
/home/frappe/frappe-bench/env/bin/gunicorn ${LOAD_CONFIG_FILE} -b 0.0.0.0:${FRAPPE_PORT} \
|
||||
--worker-tmp-dir /dev/shm \
|
||||
--threads=4 \
|
||||
--workers ${WORKERS} \
|
||||
@@ -107,16 +104,14 @@ case "$1" in
|
||||
checkConnection
|
||||
# default WORKER_TYPE=default
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/worker.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/worker.py
|
||||
;;
|
||||
|
||||
schedule)
|
||||
checkConfigExists
|
||||
checkConnection
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/background.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/background.py
|
||||
|
||||
;;
|
||||
|
||||
@@ -124,8 +119,7 @@ case "$1" in
|
||||
checkConfigExists
|
||||
checkConnection
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/new.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/new.py
|
||||
exit
|
||||
;;
|
||||
|
||||
@@ -133,27 +127,23 @@ case "$1" in
|
||||
checkConfigExists
|
||||
checkConnection
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/drop.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/drop.py
|
||||
exit
|
||||
;;
|
||||
|
||||
migrate)
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/migrate.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/migrate.py
|
||||
exit
|
||||
;;
|
||||
|
||||
doctor)
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/doctor.py "${@:2}"
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/doctor.py "${@:2}"
|
||||
exit
|
||||
;;
|
||||
|
||||
backup)
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/backup.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/backup.py
|
||||
exit
|
||||
;;
|
||||
|
||||
@@ -164,20 +154,17 @@ case "$1" in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/console.py "$2"
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/console.py "$2"
|
||||
exit
|
||||
;;
|
||||
|
||||
push-backup)
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/push_backup.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/push_backup.py
|
||||
exit
|
||||
;;
|
||||
|
||||
restore-backup)
|
||||
. /home/frappe/frappe-bench/env/bin/activate
|
||||
python /home/frappe/frappe-bench/commands/restore_backup.py
|
||||
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/restore_backup.py
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -4,13 +4,7 @@ APP_NAME=${1}
|
||||
APP_REPO=${2}
|
||||
APP_BRANCH=${3}
|
||||
|
||||
cd /home/frappe/frappe-bench/
|
||||
|
||||
. env/bin/activate
|
||||
|
||||
cd ./apps
|
||||
|
||||
[[ -n "${APP_BRANCH}" ]] && BRANCH="-b ${APP_BRANCH}"
|
||||
|
||||
git clone --depth 1 -o upstream ${APP_REPO} ${BRANCH} ${APP_NAME}
|
||||
pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/${APP_NAME}
|
||||
git clone --depth 1 -o upstream ${APP_REPO} ${BRANCH} /home/frappe/frappe-bench/apps/${APP_NAME}
|
||||
/home/frappe/frappe-bench/env/bin/pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/${APP_NAME}
|
||||
|
||||
Reference in New Issue
Block a user