瀏覽代碼

update docs

tags/v1.4.28
Jonathan Cobb 3 年之前
父節點
當前提交
f6129ad8f9
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. +6
    -2
      bin/bpatch

+ 6
- 2
bin/bpatch 查看文件

@@ -27,6 +27,10 @@ SCRIPT_DIR=$(cd $(dirname ${SCRIPT}) && pwd)
HOST=${1:?no host provided}
NO_RESTART=${2}

if [[ -z "$(echo "${HOST}" | tr -cd '[:alnum:].-')" ]] ; then
die "invalid host: ${HOST}"
fi

BUBBLE_SERVER_DIR="${SCRIPT_DIR}/../bubble-server"
if [[ ! -d "${BUBBLE_SERVER_DIR}" ]] ; then
die "bubble-server dir not found: ${BUBBLE_SERVER_DIR}"
@@ -36,9 +40,9 @@ cd ${BUBBLE_SERVER_DIR}
mvn -DskipTests=true -Dcheckstyle.skip=true compile && rsync -avzc ./target/classes ${HOST}:/tmp/ | egrep -v '*/$' || die "Error recompiling classes"

if [[ ! -z "${NO_RESTART}" && "${NO_RESTART}" == "norestart" ]] ; then
echo "Patching but not restarting..."
echo "Patching but not restarting: ${HOST} ..."
ssh -p ${BUBBLE_SSH_PORT} ${HOST} "cd /tmp && cp ~bubble/api/bubble.jar . && cd classes && jar uvf ../bubble.jar . | egrep -v '*/\(*' && cat ../bubble.jar > ~bubble/api/bubble.jar" || die "Error patching remote jar"
else
echo "Patching and restarting..."
echo "Patching and restarting: ${HOST} ..."
ssh -p ${BUBBLE_SSH_PORT} ${HOST} "cd /tmp && cp ~bubble/api/bubble.jar . && cd classes && jar uvf ../bubble.jar . | egrep -v '*/\(*' && cat ../bubble.jar > ~bubble/api/bubble.jar && supervisorctl restart bubble" || die "Error patching remote jar"
fi

Loading…
取消
儲存