mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 10:18:45 +08:00
fix: del the error world
This commit is contained in:
parent
3c1d096e99
commit
7077083aca
@ -18,7 +18,7 @@
|
||||
#
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
|
||||
############################## OpenIM Github ##############################
|
||||
# ... rest of the script ...
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
|
||||
. $(dirname ${BASH_SOURCE})/lib/init.sh
|
||||
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
# Usage: `scripts/build-all-service.sh`.
|
||||
# Example: `scripts/build-go.sh WHAT=cmd/kubelet`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
# Encapsulated as: `make check`.
|
||||
# READ: https://github.com/openimsdk/open-im-server/tree/main/scripts/install/environment.sh
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
# checks them out to a branch named:
|
||||
# automated-cherry-pick-of-<pr>-<target branch>-<timestamp>
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
# shellcheck disable=SC2034 # Variables sourced in other scripts.
|
||||
|
||||
# Common utilities, variables and checks for all build scripts.
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
# Unset CDPATH, having it set messes up with script import paths
|
||||
unset CDPATH
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
#fixme This scripts is the total startup scripts
|
||||
#fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
# Script to generate docs from the latest swagger spec.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
# The root of the build/dist directory
|
||||
OPENIM_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
# This script automatically initializes various configuration files and can generate example files.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
# Root directory of the OpenIM project
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#FIXME The full names of the shell scripts that need to be started are placed in the `need_to_start_server_shell` array.
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd -P)
|
||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||
|
||||
@ -27,9 +27,9 @@
|
||||
# Usage:
|
||||
# SERVER_IMAGE_VERSION=latest IMAGE_REGISTRY=myregistry ./this_script.sh
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
|
||||
# Common utilities, variables and checks for all build scripts.
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
# Sourced flag
|
||||
COMMON_SOURCED=true
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
# This script will install the dependencies required for openim
|
||||
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
|
||||
@ -109,7 +109,7 @@ function openim::uninstall::uninstall_openim() {
|
||||
openim::common::sudo "systemctl stop openim.target"
|
||||
openim::common::sudo "systemctl disable openim.target"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/openim.target"
|
||||
set -o errexit
|
||||
|
||||
openim::log::success "openim uninstall success"
|
||||
}
|
||||
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
@ -138,7 +138,7 @@ function openim::api::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_INSTALL_DIR}/${SERVER_NAME}"
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${SERVER_NAME}.yaml"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/${SERVER_NAME}.service"
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall ${SERVER_NAME} successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ function openim::crontask::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_INSTALL_DIR}/${SERVER_NAME}"
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${SERVER_NAME}.yaml"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/${SERVER_NAME}.service"
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall ${SERVER_NAME} successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,7 @@ function openim::man::uninstall() {
|
||||
# Turn off exit-on-error temporarily to handle non-existing files gracefully
|
||||
set +o errexit
|
||||
openim::common::sudo "rm -f /usr/share/man/man1/openim-*"
|
||||
set -o errexit
|
||||
|
||||
|
||||
openim::log::info "Uninstalled openim man pages successfully"
|
||||
}
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
# Common utilities, variables and checks for all build scripts.
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
@ -117,7 +117,7 @@ function openim::msggateway::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_INSTALL_DIR}/${SERVER_NAME}"
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${SERVER_NAME}.yaml"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/${SERVER_NAME}.service"
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall ${SERVER_NAME} successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
# ./scripts/install/openim-msgtransfer.sh openim::msgtransfer::start
|
||||
|
||||
# Common utilities, variables and checks for all build scripts.
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
@ -138,7 +138,7 @@ function openim::msgtransfer::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_INSTALL_DIR}/${SERVER_NAME}"
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${SERVER_NAME}.yaml"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/${SERVER_NAME}.service"
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall ${SERVER_NAME} successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -40,9 +40,9 @@
|
||||
#
|
||||
# Note: Ensure that the appropriate permissions and environmental variables are set prior to script execution.
|
||||
#
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
@ -125,7 +125,7 @@ function openim::push::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_INSTALL_DIR}/${SERVER_NAME}"
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${SERVER_NAME}.yaml"
|
||||
openim::common::sudo "rm -f /etc/systemd/system/${SERVER_NAME}.service"
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall ${SERVER_NAME} successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -38,9 +38,9 @@
|
||||
# Note: Before executing this script, ensure that the necessary permissions are granted and relevant environmental variables are set.
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
@ -220,7 +220,7 @@ function openim::rpc::uninstall() {
|
||||
openim::common::sudo "rm -f ${OPENIM_CONFIG_DIR}/${service}.yaml"
|
||||
openim::common::sudo "rm -f ${SYSTEM_FILE_PATHS[$service]}"
|
||||
done
|
||||
set -o errexit
|
||||
|
||||
openim::log::info "uninstall openim-rpc successfully"
|
||||
}
|
||||
|
||||
|
||||
@ -38,9 +38,9 @@
|
||||
# Example: ./openim-tools.sh openim::tools::install
|
||||
#
|
||||
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set +o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
|
||||
|
||||
# Short-circuit if init.sh has already been sourced
|
||||
[[ $(type -t openim::init::loaded) == function ]] && return 0
|
||||
|
||||
@ -75,7 +75,7 @@ openim::log::errexit() {
|
||||
|
||||
openim::log::install_errexit() {
|
||||
# trap ERR to provide an error handler whenever a command exits nonzero this
|
||||
# is a more verbose version of set -o errexit
|
||||
# is a more verbose version of
|
||||
trap 'openim::log::errexit' ERR
|
||||
|
||||
# setting errtrace allows our ERR trap handler to be propagated to functions,
|
||||
|
||||
@ -373,7 +373,7 @@ openim::util::check_ports() {
|
||||
# set +o errexit
|
||||
# Sample call for testing:
|
||||
# openim::util::check_ports 10002 1004 12345 13306
|
||||
# set -o errexit
|
||||
#
|
||||
|
||||
# The `openim::util::check_process_names` function analyzes the state of processes based on given names.
|
||||
# It accepts multiple process names as arguments and prints:
|
||||
@ -1607,7 +1607,7 @@ openim::util::check_ports() {
|
||||
# set +o errexit
|
||||
# Sample call for testing:
|
||||
# openim::util::check_ports 10002 1004 12345 13306
|
||||
# set -o errexit
|
||||
#
|
||||
|
||||
# The `openim::util::check_process_names` function analyzes the state of processes based on given names.
|
||||
# It accepts multiple process names as arguments and prints:
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
#
|
||||
# Usage: `scripts/list-feature-tests.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
grep "\[Feature:\w+\]" "${OPENIM_ROOT}"/test/e2e/**/*.go -Eoh | LC_ALL=C sort -u
|
||||
@ -47,9 +47,9 @@
|
||||
# images and other build artifacts.
|
||||
# Build a OpenIM release. This script supports various flags for flexible execution control.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/common.sh"
|
||||
source "${OPENIM_ROOT}/scripts/lib/release.sh"
|
||||
|
||||
@ -20,9 +20,9 @@
|
||||
# the project.
|
||||
# Usage: `scripts/run-in-gopath.sh <command>`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#FIXME The full names of the shell scripts that need to be started are placed in the `need_to_start_server_shell` array.
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||
@ -30,7 +30,7 @@ if [[ $? -ne 0 ]]; then
|
||||
openim::log::error "OpenIM binaries are not found. Please run 'make build' to build binaries."
|
||||
"${OPENIM_ROOT}"/scripts/build-all-service.sh
|
||||
fi
|
||||
set -o errexit
|
||||
|
||||
|
||||
"${OPENIM_ROOT}"/scripts/init-config.sh --skip
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
# Usage: `scripts/stop.sh`.
|
||||
# Encapsulated as: `make stop`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
# immediately before exporting docs. We do not want to check these documents in
|
||||
# by default.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -14,9 +14,9 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
# This script verifies whether codes follow golang convention.
|
||||
# Usage: `scripts/verify-pkg-names.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
# This script lints each shell script by `shellcheck`.
|
||||
# Usage: `scripts/verify-shellcheck.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
# working directory by client9/misspell package.
|
||||
# Usage: `scripts/verify-spelling.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
export OPENIM_ROOT
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
# This script does a fast type check of script srnetes code for all platforms.
|
||||
# Usage: `scripts/verify-typecheck.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
#
|
||||
# Usage: `scripts/verify-yamlfmt.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user