From 52f9fc20996ead702b0a3b81c0a2033308164be4 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw)" <3293172751nss@gmail.com> Date: Fri, 12 Jan 2024 15:15:28 +0800 Subject: [PATCH] feat: set openim lint Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com> --- scripts/lib/release.sh | 23 ++++++++++++++++------- scripts/lib/util.sh | 4 ---- scripts/make-rules/common.mk | 3 ++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/scripts/lib/release.sh b/scripts/lib/release.sh index 3ee14ee53..c1ab1fef9 100755 --- a/scripts/lib/release.sh +++ b/scripts/lib/release.sh @@ -609,6 +609,10 @@ EOF # https://github.com/github-release/github-release function openim::release::github_release() { # create a github release + if [ -z "${GITHUB_TOKEN}" ];then + openim::log::error "can not find env: GITHUB_TOKEN" + return 1 + fi openim::log::info "create a new github release with tag ${OPENIM_GIT_VERSION}" ${TOOLS_DIR}/github-release release \ --user ${OPENIM_GITHUB_ORG} \ @@ -626,13 +630,18 @@ function openim::release::github_release() { --name ${ARTIFACT} \ --file ${RELEASE_TARS}/${ARTIFACT} - openim::log::info "upload openim-src.tar.gz to release ${OPENIM_GIT_VERSION}" - ${TOOLS_DIR}/github-release upload \ - --user ${OPENIM_GITHUB_ORG} \ - --repo ${OPENIM_GITHUB_REPO} \ - --tag ${OPENIM_GIT_VERSION} \ - --name "openim-src.tar.gz" \ - --file ${RELEASE_TARS}/openim-src.tar.gz + for file in ${RELEASE_TARS}/*.tar.gz; do + if [[ -f "$file" ]]; then + filename=$(basename "$file") + openim::log::info "Update file ${filename} to release vertion ${OPENIM_GIT_VERSION}" + ${TOOLS_DIR}/github-release upload \ + --user ${OPENIM_GITHUB_ORG} \ + --repo ${OPENIM_GITHUB_REPO} \ + --tag ${OPENIM_GIT_VERSION} \ + --name "${filename}" \ + --file "${file}" + fi + done } function openim::release::generate_changelog() { diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 85d732e3f..ff465595b 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -306,12 +306,8 @@ openim::util::check_ports() { if [[ "$OSTYPE" == "linux-gnu"* ]]; then if command -v ss > /dev/null 2>&1; then info=$(ss -ltnp | grep ":$port" || true) - echo "!!!!!!!!!!! port=$port" - echo "!!!!!!!!!!! info=$info" else info=$(netstat -ltnp | grep ":$port" || true) - echo "!!!!!!!!!!! port=$port" - echo "!!!!!!!!!!! info=$info" fi elif [[ "$OSTYPE" == "darwin"* ]]; then # For macOS, use lsof diff --git a/scripts/make-rules/common.mk b/scripts/make-rules/common.mk index 5230580da..5fda9b927 100644 --- a/scripts/make-rules/common.mk +++ b/scripts/make-rules/common.mk @@ -73,7 +73,8 @@ endif ifeq ($(origin VERSION), undefined) # VERSION := $(shell git describe --tags --always --match='v*') # git describe --tags --always --match="v*" --dirty -VERSION := $(shell git describe --tags --always --match="v*" --dirty | sed 's/-/./g') #v2.3.3.631.g00abdc9b.dirty +# VERSION := $(shell git describe --tags --always --match="v*" --dirty | sed 's/-/./g') #v2.3.3.631.g00abdc9b.dirty +VERSION := $(shell git describe --tags --always --match='v*') # v2.3.3: git tag endif