mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
feat: Introduce Language-Specific Comment Detection Tool and Standardize Log Filename Convention (#1992)
* feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code * feat: optimize openim reset code
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
# Example: `scripts/build-go.sh WHAT=cmd/kubelet`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
|
||||
# Common utilities, variables and checks for all build scripts.
|
||||
|
||||
|
||||
|
||||
|
||||
# Unset CDPATH, having it set messes up with script import paths
|
||||
unset CDPATH
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ def "OPENIM_CONVERSATION_NAME" "Conversation" # OpenIM对话服务名称
|
||||
def "OPENIM_THIRD_NAME" "Third" # OpenIM第三方服务名称
|
||||
|
||||
###################### Log Configuration Variables ######################
|
||||
def "LOG_STORAGE_LOCATION" "${OPENIM_ROOT}/logs/" # 日志存储位置
|
||||
def "LOG_STORAGE_LOCATION" "${OPENIM_ROOT}/_output/logs/" # 日志存储位置
|
||||
def "LOG_ROTATION_TIME" "24" # 日志轮替时间
|
||||
def "LOG_REMAIN_ROTATION_COUNT" "2" # 保留的日志轮替数量
|
||||
def "LOG_REMAIN_LOG_LEVEL" "6" # 保留的日志级别
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
# Note: Before executing this script, ensure that the necessary permissions are granted and relevant environmental variables are set.
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
|
||||
[[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh
|
||||
|
||||
|
||||
@@ -14,9 +14,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Short-circuit if init.sh has already been sourced
|
||||
[[ $(type -t openim::init::loaded) == function ]] && return 0
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ if [ -z "${OPENIM_OUTPUT+x}" ]; then
|
||||
fi
|
||||
|
||||
# Set the log file path
|
||||
LOG_FILE="${OPENIM_OUTPUT}/logs/openim_$(date '+%Y%m%d').log"
|
||||
STDERR_LOG_FILE="${OPENIM_OUTPUT}/logs/openim_error_$(date '+%Y%m%d').log"
|
||||
TMP_LOG_FILE="${OPENIM_OUTPUT}/logs/openim_tmp_$(date '+%Y%m%d').log"
|
||||
LOG_FILE="${OPENIM_OUTPUT}/logs/openim-$(date '+%Y%m%d').log"
|
||||
STDERR_LOG_FILE="${OPENIM_OUTPUT}/logs/openim-error-$(date '+%Y%m%d').log"
|
||||
TMP_LOG_FILE="${OPENIM_OUTPUT}/logs/openim-tmp-$(date '+%Y%m%d').log"
|
||||
|
||||
if [[ ! -d "${OPENIM_OUTPUT}/logs" ]]; then
|
||||
mkdir -p "${OPENIM_OUTPUT}/logs"
|
||||
|
||||
@@ -152,6 +152,7 @@ function openim::release::package_src_tarball() {
|
||||
-path "${OPENIM_ROOT}"/.github\* -o \
|
||||
-path "${OPENIM_ROOT}"/components\* -o \
|
||||
-path "${OPENIM_ROOT}"/logs\* -o \
|
||||
-path "${OPENIM_ROOT}"/_output\* -o \
|
||||
-path "${OPENIM_ROOT}"/.gitignore\* -o \
|
||||
-path "${OPENIM_ROOT}"/.gsemver.yml\* -o \
|
||||
-path "${OPENIM_ROOT}"/.config\* -o \
|
||||
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright © 2023 OpenIM. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# This script verifies whether codes follow golang convention.
|
||||
# Usage: `scripts/verify-pkg-names.sh`.
|
||||
|
||||
set -o errexit
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
openim::golang::verify_go_version
|
||||
|
||||
openim::golang::verify_go_version
|
||||
|
||||
OPENIM_OUTPUT_HOSTBIN_TOOLS="${OPENIM_ROOT}/_output/bin/tools/linux/amd64"
|
||||
CODESCAN_BINARY="${OPENIM_OUTPUT_HOSTBIN_TOOLS}/codescan"
|
||||
|
||||
if [[ ! -f "${CODESCAN_BINARY}" ]]; then
|
||||
echo "codescan binary not found, building..."
|
||||
pushd "${OPENIM_ROOT}" >/dev/null
|
||||
make build BINS="codescan"
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
if [[ ! -f "${CODESCAN_BINARY}" ]]; then
|
||||
echo "Failed to build codescan binary."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONFIG_PATH="${OPENIM_ROOT}/tools/codescan/config.yaml"
|
||||
|
||||
"${CODESCAN_BINARY}" -config "${CONFIG_PATH}"
|
||||
@@ -18,9 +18,6 @@
|
||||
# Usage: `scripts/verify-pkg-names.sh`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user