From 336adc766ec8dff8a272a07d6c74b5e2bd7cba36 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Fri, 27 Mar 2026 16:18:44 +0800 Subject: [PATCH 1/9] fix(bug): fix router --- .../components/PersonalProjectTable.tsx | 13 +- app/person/dashboard/page.tsx | 5 +- app/person/layout.tsx | 8 +- build.sh | 10 +- components/label/hooks/useAuth.ts | 121 ++++++++++++++++++ components/label/store/auth.ts | 9 +- components/layout/common.ts | 10 +- 7 files changed, 153 insertions(+), 23 deletions(-) create mode 100644 components/label/hooks/useAuth.ts diff --git a/app/person/dashboard/components/PersonalProjectTable.tsx b/app/person/dashboard/components/PersonalProjectTable.tsx index 97e8c36..213aa6e 100644 --- a/app/person/dashboard/components/PersonalProjectTable.tsx +++ b/app/person/dashboard/components/PersonalProjectTable.tsx @@ -2,7 +2,7 @@ import { getPersonProjectDashBoard } from "@/components/label/api/project" import { Project } from "@/components/label/api/project/typing" -import { Button, Group, Text, UnstyledButton } from "@mantine/core" +import { Button, Group, Text } from "@mantine/core" import { IconRefresh } from "@tabler/icons-react" import dayjs from "dayjs" @@ -76,15 +76,16 @@ export default function PersonalProjectTable() { width: 150, render: (record: Project.PersonProjectDashboardResponseItem) => { return ( - { - setCurrentRowId(record.project_id) - router.push(`/project/info/detail?id=${record.project_id}`) + false && setCurrentRowId(record.project_id) + false && + router.push(`/project/info/detail?id=${record.project_id}`) }} title={record.project_id.toString()} - c={"brand"} + // c={"brand"} style={{ fontSize: "14px", maxWidth: "100%", @@ -93,7 +94,7 @@ export default function PersonalProjectTable() { textOverflow: "ellipsis", }}> {record.project_id} - + ) }, }, diff --git a/app/person/dashboard/page.tsx b/app/person/dashboard/page.tsx index 0da1889..0640037 100644 --- a/app/person/dashboard/page.tsx +++ b/app/person/dashboard/page.tsx @@ -247,7 +247,10 @@ export default function PersonDashboardPage() { - + {children} diff --git a/build.sh b/build.sh index 18f4501..fc36286 100755 --- a/build.sh +++ b/build.sh @@ -51,11 +51,11 @@ FLAG_PROD="${ENV}_latest" cd $SHELL_FOLDER -# 检查git状态 -echo -e "${GREEN}Checking git status...${NC}" -git fetch -git merge -if [[ $? != 0 ]]; then echo -e "${RED}git pull error${NC}"; exit 100; fi +# # 检查git状态 +# echo -e "${GREEN}Checking git status...${NC}" +# git fetch +# git merge +# if [[ $? != 0 ]]; then echo -e "${RED}git pull error${NC}"; exit 100; fi BRANCH_NAME=`git branch | grep "*"` echo -e "${GREEN}Current branch: ${BRANCH_NAME/* /}${NC}" diff --git a/components/label/hooks/useAuth.ts b/components/label/hooks/useAuth.ts new file mode 100644 index 0000000..4114743 --- /dev/null +++ b/components/label/hooks/useAuth.ts @@ -0,0 +1,121 @@ +"use client" + +import { usePermissionStore } from "@/components/label/store/auth" +import { usePathname } from "next/navigation" + +interface PermissionItem { + [x: string]: [boolean, null, string] +} + +type PermissionMap = { + [x: string]: PermissionItem +} + +const mappingList: { [x: string]: [string, string] } = { + "/project/own": ["project", "config"], + "/management/team/employee": ["user", "view"], + "/management/team/organization": ["user", "group_view"], + "/management/team/dailypaper": ["daily_work", "team_view"], + "/management/team/cost": ["settlement_form", "view"], + "/management/team/workload": ["workload", "view"], + "/management/team/sync_server": ["data_sync", "server_view"], + "/management/team/sync_task": ["data_sync", "task_view"], + "/management/team/board": ["user", "view"], +} + +export const headerBarCheckItems = (data: PermissionMap) => { + const projectTitle = [ + ["daily_work", "self_view"], + ["label_schema", "view"], + ["project", "view"], + ["task", "view"], + ] as const + + let projectVisible = false + projectTitle.forEach(([prop, subProp]) => { + if (data[prop] && data[prop][subProp] && data[prop][subProp][0]) { + projectVisible = true + } + }) + + const staffTitle = [ + ["daily_work", "team_view"], + ["user", "view"], + ["user", "group_view"], + ] as const + + let staffVisible = false + staffTitle.forEach(([prop, subProp]) => { + if (data[prop] && data[prop][subProp] && data[prop][subProp][0]) { + staffVisible = true + } + }) + + return [projectVisible, staffVisible] +} + +const useAuth = () => { + const pathname = usePathname() + const detailInfo = usePermissionStore((s) => s.detailInfo) + const permission = detailInfo?.permissions as PermissionMap | undefined + const roleName: string[] = detailInfo?.role_name ?? [] + + return { + hasPermission: () => { + if ( + [ + "/", + "/login", + "/management", + "/management/person/dashboard", + "/management/team", + ].includes(pathname) + ) { + return true + } + + if (!permission) return false + if (mappingList[pathname]) { + const [prop, subProp] = mappingList[pathname] + return ( + !!permission[prop] && + !!permission[prop][subProp] && + !!permission[prop][subProp][0] + ) + } + return false + }, + // path 跳转是否可见 + canNv: (path: string, type = "view") => { + if (!permission) return false + if (mappingList[path]) { + const [prop] = mappingList[path] + return ( + !!permission[prop] && + !!permission[prop][type] && + !!permission[prop][type][0] + ) + } + return false + }, + // 当前页面是否可见某个操作 + isShow: (type = "view") => { + if (!permission) return false + if (mappingList[pathname]) { + const [prop] = mappingList[pathname] + return ( + !!permission[prop] && + !!permission[prop][type] && + !!permission[prop][type][0] + ) + } + return false + }, + checkRole: (name: string) => { + if (!name) return false + return roleName.includes(name) + }, + } +} + +export default useAuth diff --git a/components/label/store/auth.ts b/components/label/store/auth.ts index ac584ce..5ef8fc5 100644 --- a/components/label/store/auth.ts +++ b/components/label/store/auth.ts @@ -263,8 +263,13 @@ export const useBackUrlStore = create( (set) => ({ backUrl: null, backTitle: null, - setBackProps: (url: string, title?: string) => - set({ backUrl: url, backTitle: title || null }), + basePath: "", + setBackProps: (url: string, title?: string, basePath?: string) => + set({ + backUrl: url, + backTitle: title || null, + basePath: basePath || "", + }), }), { name: "back_url", diff --git a/components/layout/common.ts b/components/layout/common.ts index 66d9bbe..a81f283 100644 --- a/components/layout/common.ts +++ b/components/layout/common.ts @@ -81,11 +81,11 @@ export const componentList: MenuItem[] = [ url: "video", icon: "SystemIcon", }, - { - title: "点云标注", - url: "pointcloud", - icon: "SystemIcon", - }, + // { + // title: "点云标注", + // url: "pointcloud", + // icon: "SystemIcon", + // }, { title: "管理中心", url: "mgt", From 2429e3ce744ebed6056ba078b7cba06f38a4b246 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Fri, 27 Mar 2026 19:40:37 +0800 Subject: [PATCH 2/9] fix(auth): header --- app/person/layout.tsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/app/person/layout.tsx b/app/person/layout.tsx index 738da1e..c78bb51 100644 --- a/app/person/layout.tsx +++ b/app/person/layout.tsx @@ -1,17 +1,28 @@ +"use client" + +import { usePermissionStore } from "@/components/label/store/auth" import AppLayout from "@/components/layout/AppLayout" import { PathnameRecorder } from "@/components/layout/PathnameRecorder" import { componentList, showList } from "@/components/layout/common" +import { useMemo } from "react" // async function getMenu() { // return [...componentList, ...showList] // } -export default async function Layout({ - children, -}: { - children: React.ReactNode -}) { - const menu = [...componentList, ...showList] +export default function Layout({ children }: { children: React.ReactNode }) { + const detailInfo = usePermissionStore((s) => s.detailInfo) + + const menu = useMemo(() => { + if (detailInfo?.roles?.length) { + return [...componentList, ...showList] + } else { + return [...componentList, ...showList].filter( + (item) => item.title !== "管理中心" + ) + } + }, [detailInfo?.roles?.length]) + return ( {children} From 318c260ff259fe47425164420f6547abe5c5be4a Mon Sep 17 00:00:00 2001 From: zhangheng Date: Fri, 27 Mar 2026 20:01:31 +0800 Subject: [PATCH 3/9] fix(sh): build --- .gitlab-ci.yml | 28 ++++++++++++++++++++++++++++ build.sh | 12 ++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ee1efeb --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +stages: + - sync_github + +sync_github: + stage: sync_github + tags: + - webfront + image: harbor.cowarobot.cn/softrepo/rust_build:1.94 + script: + - echo "代码已合并到 main, 开始执行发布逻辑..." + - | + for i in {1..10}; do + if command -v docker >/dev/null 2>&1 && [ -S /var/run/docker.sock ]; then + echo "Docker is ready!" + break + fi + echo "Waiting for Docker..." + sleep 2 + done + - docker info + - echo ${CI_PROJECT_NAME} ${CI_PROJECT_PATH} ${CI_PROJECT_DIR} ${CI_PROJECT_URL} ${CI_COMMIT_SHA} + - echo ${HARBORKEY} | docker login harbor.cowarobot.cn -u 'robot$softpro+cibuild' --password-stdin + - rm -rf ${CI_PROJECT_NAME} + - git clone https://oauth2:m9pTBnoJ42udznhUZr8p@git.cowarobot.com/${CI_PROJECT_PATH} + - cd ${CI_PROJECT_NAME} + - bash build.sh + rules: + - if: $CI_COMMIT_BRANCH == "zh" diff --git a/build.sh b/build.sh index fc36286..5ebde16 100755 --- a/build.sh +++ b/build.sh @@ -71,23 +71,23 @@ pnpm run $BUILD_FLAG if [[ $? != 0 ]]; then echo -e "${RED}build error${NC}"; exit 100; fi # Docker构建和推送 -MAIN_NAME=digitalspace_labelmain +MAIN_NAME=web_digitalspace_labelmain DOCKER_FILE=$SHELL_FOLDER/Dockerfile if [[ $OUTPUT_TYPE == export ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/nginx.dockerfile - MAIN_NAME=digitalspace_labelmain_static + MAIN_NAME=web_digitalspace_labelmain_static elif [[ $OUTPUT_TYPE == standalone ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/node.dockerfile - MAIN_NAME=digitalspace_labelmain_ssr + MAIN_NAME=web_digitalspace_labelmain_ssr fi echo -e "${GREEN}Building docker image...${NC}" -sudo docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER +docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER if [[ $? != 0 ]]; then echo -e "${RED}build docker with error${NC}"; exit 100; fi echo -e "${GREEN}Tagging and pushing docker image...${NC}" -sudo docker tag $MAIN_NAME harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD -# docker push harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD +docker tag $MAIN_NAME harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD +docker push harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD echo -e "${GREEN}Build completed successfully${NC}" From ea3e7254029c111ce2ea5525caad756a3ae2badc Mon Sep 17 00:00:00 2001 From: zhangheng Date: Fri, 27 Mar 2026 20:04:22 +0800 Subject: [PATCH 4/9] fix(git): env --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee1efeb..d996ce6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ sync_github: - echo ${CI_PROJECT_NAME} ${CI_PROJECT_PATH} ${CI_PROJECT_DIR} ${CI_PROJECT_URL} ${CI_COMMIT_SHA} - echo ${HARBORKEY} | docker login harbor.cowarobot.cn -u 'robot$softpro+cibuild' --password-stdin - rm -rf ${CI_PROJECT_NAME} - - git clone https://oauth2:m9pTBnoJ42udznhUZr8p@git.cowarobot.com/${CI_PROJECT_PATH} + - git clone https://oauth2:glpat-EdU8a_84jpSH2nOlNTkpnW86MQp1OjY1CA.01.0y1rtht99@git.cowarobot.com/${CI_PROJECT_PATH} - cd ${CI_PROJECT_NAME} - bash build.sh rules: From fab6cc9791be09448ca43c8db1cb8b3bd72d3cdf Mon Sep 17 00:00:00 2001 From: zhangheng Date: Fri, 27 Mar 2026 20:11:08 +0800 Subject: [PATCH 5/9] fix(sh): branch set main --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d996ce6..0ffd9f5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,4 +25,4 @@ sync_github: - cd ${CI_PROJECT_NAME} - bash build.sh rules: - - if: $CI_COMMIT_BRANCH == "zh" + - if: $CI_COMMIT_BRANCH == "main" From aa1992f9d9cf384cff814ab4d49fa97586d857ad Mon Sep 17 00:00:00 2001 From: zhangheng Date: Sat, 28 Mar 2026 13:54:32 +0800 Subject: [PATCH 6/9] fix(env): docker --- .env.development | 6 +++--- .env.staging | 2 +- build.sh | 4 ++-- components/label/api/const.ts | 2 +- components/layout/common.ts | 8 ++++---- components/login/api/index.ts | 2 +- docker-compose.yml | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.env.development b/.env.development index dc0fe94..eb8bf3c 100644 --- a/.env.development +++ b/.env.development @@ -5,10 +5,10 @@ NEXT_PUBLIC_ENV=development # redis -# NEXT_PUBLIC_REDIS_URL="172.16.112.128" -NEXT_PUBLIC_REDIS_URL="localhost" +# NEXT_PUBLIC_REDIS_URL="172.16.115.128" +NEXT_PUBLIC_REDIS_URL="172.30.21.213" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password NEXT_PUBLIC_REDIS_USERNAME=default -NEXT_PUBLIC_REDIS_DB=0 +NEXT_PUBLIC_REDIS_DB=1 diff --git a/.env.staging b/.env.staging index 1fd59f4..edfe9c2 100644 --- a/.env.staging +++ b/.env.staging @@ -3,7 +3,7 @@ NEXT_PUBLIC_BASE_PATH="" NEXT_PUBLIC_ENV=staging # redis -NEXT_PUBLIC_REDIS_URL="172.30.21.213" +NEXT_PUBLIC_REDIS_URL="172.16.115.128" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password NEXT_PUBLIC_REDIS_USERNAME=default diff --git a/build.sh b/build.sh index 5ebde16..db4a281 100755 --- a/build.sh +++ b/build.sh @@ -87,7 +87,7 @@ docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER if [[ $? != 0 ]]; then echo -e "${RED}build docker with error${NC}"; exit 100; fi echo -e "${GREEN}Tagging and pushing docker image...${NC}" -docker tag $MAIN_NAME harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD -docker push harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD +docker tag $MAIN_NAME harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD +docker push harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD echo -e "${GREEN}Build completed successfully${NC}" diff --git a/components/label/api/const.ts b/components/label/api/const.ts index 8b520b4..85a96fa 100644 --- a/components/label/api/const.ts +++ b/components/label/api/const.ts @@ -2,5 +2,5 @@ export const BASE_LABEL_API = process.env.NEXT_PUBLIC_ENV === "production" ? "https://label.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" - ? "https://label.softtest.cowarobot.com" + ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" diff --git a/components/layout/common.ts b/components/layout/common.ts index a81f283..7b353c1 100644 --- a/components/layout/common.ts +++ b/components/layout/common.ts @@ -32,19 +32,19 @@ export const subConfigList: { source: string; url: string }[] = ? [ { source: "/image", - url: "http://172.30.21.213:5532", + url: "http://172.16.115.128:5532", }, { source: "/video", - url: "http://172.30.21.213:5533", + url: "http://172.16.115.128:5533", }, { source: "/lidar", - url: "http://172.30.21.213:5534", + url: "http://172.16.115.128:5534", }, { source: "/mgt", - url: "http://172.30.21.213:5535", + url: "http://172.16.115.128:5535", }, ] : [] diff --git a/components/login/api/index.ts b/components/login/api/index.ts index a4d5890..c3d63e8 100644 --- a/components/login/api/index.ts +++ b/components/login/api/index.ts @@ -6,7 +6,7 @@ const BASE_PATH = process.env.NEXT_PUBLIC_ENV === "production" ? "https://label.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" - ? "https://label.softtest.cowarobot.com" + ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" // 获取验证码 diff --git a/docker-compose.yml b/docker-compose.yml index 5d2e20e..c1136d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ version: "3" services: - digitalspace_labelmain_ssr: - container_name: digitalspace_labelmain_ssr - image: harbor.cowarobot.cn/gopro/digitalspace_labelmain_ssr:stage_latest + web_digitalspace_labelmain_ssr: + container_name: web_digitalspace_labelmain_ssr + image: harbor.cowarobot.cn/softrepo/web_digitalspace_labelmain_ssr:stage_latest restart: unless-stopped ports: - 5531:5531 From 592e2464268f9f7ab4079986992297cd089a588d Mon Sep 17 00:00:00 2001 From: zhangheng Date: Sat, 28 Mar 2026 16:39:10 +0800 Subject: [PATCH 7/9] feat(ci): add file --- .gitlab-ci.yml | 2 +- components/label/api/const.ts | 2 +- components/layout/common.ts | 19 ++++++++++++++++++- components/login/api/index.ts | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ffd9f5..610a3a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,6 +23,6 @@ sync_github: - rm -rf ${CI_PROJECT_NAME} - git clone https://oauth2:glpat-EdU8a_84jpSH2nOlNTkpnW86MQp1OjY1CA.01.0y1rtht99@git.cowarobot.com/${CI_PROJECT_PATH} - cd ${CI_PROJECT_NAME} - - bash build.sh + - bash build.sh prod rules: - if: $CI_COMMIT_BRANCH == "main" diff --git a/components/label/api/const.ts b/components/label/api/const.ts index 85a96fa..5e1fb07 100644 --- a/components/label/api/const.ts +++ b/components/label/api/const.ts @@ -1,6 +1,6 @@ export const BASE_LABEL_API = process.env.NEXT_PUBLIC_ENV === "production" - ? "https://label.cowarobot.com" + ? "https://label.soft.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" diff --git a/components/layout/common.ts b/components/layout/common.ts index 7b353c1..f854411 100644 --- a/components/layout/common.ts +++ b/components/layout/common.ts @@ -47,7 +47,24 @@ export const subConfigList: { source: string; url: string }[] = url: "http://172.16.115.128:5535", }, ] - : [] + : [ + { + source: "/image", + url: "https://label.soft.cowarobot.com", + }, + { + source: "/video", + url: "https://label.soft.cowarobot.com", + }, + { + source: "/lidar", + url: "https://label.soft.cowarobot.com", + }, + { + source: "/mgt", + url: "https://label.soft.cowarobot.com", + }, + ] const currentComponentList: MenuItem[] = [ { diff --git a/components/login/api/index.ts b/components/login/api/index.ts index c3d63e8..2075b43 100644 --- a/components/login/api/index.ts +++ b/components/login/api/index.ts @@ -4,7 +4,7 @@ import { Login } from "./types" const BASE_PATH = process.env.NEXT_PUBLIC_ENV === "production" - ? "https://label.cowarobot.com" + ? "https://label.soft.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" From fcf91306104f04048bc2106fb783d08e062677e8 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Sat, 28 Mar 2026 17:30:04 +0800 Subject: [PATCH 8/9] fix(env): fix --- .gitlab-ci.yml | 4 ++-- build.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 610a3a5..4380e73 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: sync_github: stage: sync_github tags: - - webfront + - webbuild image: harbor.cowarobot.cn/softrepo/rust_build:1.94 script: - echo "代码已合并到 main, 开始执行发布逻辑..." @@ -21,7 +21,7 @@ sync_github: - echo ${CI_PROJECT_NAME} ${CI_PROJECT_PATH} ${CI_PROJECT_DIR} ${CI_PROJECT_URL} ${CI_COMMIT_SHA} - echo ${HARBORKEY} | docker login harbor.cowarobot.cn -u 'robot$softpro+cibuild' --password-stdin - rm -rf ${CI_PROJECT_NAME} - - git clone https://oauth2:glpat-EdU8a_84jpSH2nOlNTkpnW86MQp1OjY1CA.01.0y1rtht99@git.cowarobot.com/${CI_PROJECT_PATH} + - git clone https://oauth2:${TOKEN}@git.cowarobot.com/${CI_PROJECT_PATH} - cd ${CI_PROJECT_NAME} - bash build.sh prod rules: diff --git a/build.sh b/build.sh index db4a281..c6d2862 100755 --- a/build.sh +++ b/build.sh @@ -73,6 +73,9 @@ if [[ $? != 0 ]]; then echo -e "${RED}build error${NC}"; exit 100; fi # Docker构建和推送 MAIN_NAME=web_digitalspace_labelmain DOCKER_FILE=$SHELL_FOLDER/Dockerfile +HARBOR_REPO=softrepo +if [[ $ENV == prod ]]; then + HARBOR_REPO=softpro if [[ $OUTPUT_TYPE == export ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/nginx.dockerfile @@ -87,7 +90,7 @@ docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER if [[ $? != 0 ]]; then echo -e "${RED}build docker with error${NC}"; exit 100; fi echo -e "${GREEN}Tagging and pushing docker image...${NC}" -docker tag $MAIN_NAME harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD -docker push harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD +docker tag $MAIN_NAME harbor.cowarobot.cn/$HARBOR_REPO/$MAIN_NAME:$FLAG_PROD +docker push harbor.cowarobot.cn/$HARBOR_REPO/$MAIN_NAME:$FLAG_PROD echo -e "${GREEN}Build completed successfully${NC}" From 6743fbc9432c0280e2bf61731ef8f2dde07c400d Mon Sep 17 00:00:00 2001 From: zhangheng Date: Sat, 28 Mar 2026 17:34:59 +0800 Subject: [PATCH 9/9] fix(sh): fix --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index c6d2862..6745453 100755 --- a/build.sh +++ b/build.sh @@ -76,6 +76,7 @@ DOCKER_FILE=$SHELL_FOLDER/Dockerfile HARBOR_REPO=softrepo if [[ $ENV == prod ]]; then HARBOR_REPO=softpro +fi if [[ $OUTPUT_TYPE == export ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/nginx.dockerfile