chore: version to 1.2.4

This commit is contained in:
Kerwin
2025-08-21 09:23:45 +08:00
parent 8cf1575232
commit 9708157566
6 changed files with 62 additions and 29 deletions

View File

@@ -35,6 +35,12 @@
- [服务器要求](https://ecn5khs4t956.feishu.cn/wiki/W8YBww1Mmiu4Cdkp5W4c8pFNnMf?from=from_copylink) - [服务器要求](https://ecn5khs4t956.feishu.cn/wiki/W8YBww1Mmiu4Cdkp5W4c8pFNnMf?from=from_copylink)
- [QQ机器人](https://github.com/ctwj/astrbot_plugin_urldb) - [QQ机器人](https://github.com/ctwj/astrbot_plugin_urldb)
### v1.2.4
1. 搜索增强,毫秒级响应,关键字高亮显示
2. 修复版本显示不正确的问题
3. 配置项新增Meilisearch配置
### v1.2.3 ### v1.2.3
1. 添加图片上传功能 1. 添加图片上传功能
2. 添加Logo配置项首页Logo显示 2. 添加Logo配置项首页Logo显示

View File

@@ -20,7 +20,7 @@ services:
- app-network - app-network
backend: backend:
image: ctwj/urldb-backend:1.2.3 image: ctwj/urldb-backend:1.2.4
environment: environment:
DB_HOST: postgres DB_HOST: postgres
DB_PORT: 5432 DB_PORT: 5432
@@ -38,7 +38,7 @@ services:
- app-network - app-network
frontend: frontend:
image: ctwj/urldb-frontend:1.2.3 image: ctwj/urldb-frontend:1.2.4
environment: environment:
NODE_ENV: production NODE_ENV: production
NUXT_PUBLIC_API_SERVER: http://backend:8080/api NUXT_PUBLIC_API_SERVER: http://backend:8080/api

View File

@@ -33,6 +33,7 @@ get_git_branch() {
# 构建Docker镜像 # 构建Docker镜像
build_docker() { build_docker() {
local version=$(get_version $1) local version=$(get_version $1)
local skip_frontend=$2
local git_commit=$(get_git_commit) local git_commit=$(get_git_commit)
local git_branch=$(get_git_branch) local git_branch=$(get_git_branch)
local build_time=$(date '+%Y-%m-%d %H:%M:%S') local build_time=$(date '+%Y-%m-%d %H:%M:%S')
@@ -42,23 +43,35 @@ build_docker() {
echo -e "Git提交: ${GREEN}${git_commit}${NC}" echo -e "Git提交: ${GREEN}${git_commit}${NC}"
echo -e "Git分支: ${GREEN}${git_branch}${NC}" echo -e "Git分支: ${GREEN}${git_branch}${NC}"
echo -e "构建时间: ${GREEN}${build_time}${NC}" echo -e "构建时间: ${GREEN}${build_time}${NC}"
if [ "$skip_frontend" = "true" ]; then
echo -e "跳过前端构建: ${GREEN}${NC}"
fi
# 直接使用 docker build避免 buildx 的复杂性 # 直接使用 docker build避免 buildx 的复杂性
BUILD_CMD="docker build" BUILD_CMD="docker build"
echo -e "${BLUE}使用构建命令: ${BUILD_CMD}${NC}" echo -e "${BLUE}使用构建命令: ${BUILD_CMD}${NC}"
# 构建前端镜像 # 构建前端镜像(可选)
echo -e "${YELLOW}构建前端镜像...${NC}" if [ "$skip_frontend" != "true" ]; then
FRONTEND_CMD="${BUILD_CMD} --build-arg VERSION=${version} --build-arg GIT_COMMIT=${git_commit} --build-arg GIT_BRANCH=${git_branch} --build-arg BUILD_TIME=${build_time} --target frontend -t ctwj/urldb-frontend:${version} ." echo -e "${YELLOW}构建前端镜像...${NC}"
echo -e "${BLUE}执行命令: ${FRONTEND_CMD}${NC}" FRONTEND_CMD="${BUILD_CMD} --build-arg VERSION=${version} --build-arg GIT_COMMIT=${git_commit} --build-arg GIT_BRANCH=${git_branch} --build-arg BUILD_TIME=${build_time} --target frontend -t ctwj/urldb-frontend:${version} ."
${BUILD_CMD} \ echo -e "${BLUE}执行命令: ${FRONTEND_CMD}${NC}"
--build-arg VERSION=${version} \ ${BUILD_CMD} \
--build-arg GIT_COMMIT=${git_commit} \ --build-arg VERSION=${version} \
--build-arg GIT_BRANCH=${git_branch} \ --build-arg GIT_COMMIT=${git_commit} \
--build-arg "BUILD_TIME=${build_time}" \ --build-arg GIT_BRANCH=${git_branch} \
--target frontend \ --build-arg "BUILD_TIME=${build_time}" \
-t ctwj/urldb-frontend:${version} \ --target frontend \
. -t ctwj/urldb-frontend:${version} \
.
if [ $? -ne 0 ]; then
echo -e "${RED}前端构建失败!${NC}"
exit 1
fi
else
echo -e "${YELLOW}跳过前端构建${NC}"
fi
# 构建后端镜像 # 构建后端镜像
echo -e "${YELLOW}构建后端镜像...${NC}" echo -e "${YELLOW}构建后端镜像...${NC}"
@@ -72,12 +85,18 @@ build_docker() {
--target backend \ --target backend \
-t ctwj/urldb-backend:${version} \ -t ctwj/urldb-backend:${version} \
. .
if [ $? -ne 0 ]; then
echo -e "${RED}后端构建失败!${NC}"
exit 1
fi
echo -e "${GREEN}Docker构建完成!${NC}" echo -e "${GREEN}Docker构建完成!${NC}"
echo -e "镜像标签:" echo -e "镜像标签:"
echo -e " ${GREEN}ctwj/urldb-backend:${version}${NC}" echo -e " ${GREEN}ctwj/urldb-backend:${version}${NC}"
echo -e " ${GREEN}ctwj/urldb-frontend:${version}${NC}" if [ "$skip_frontend" != "true" ]; then
echo -e " ${GREEN}ctwj/urldb-frontend:${version}${NC}"
fi
} }
# 推送镜像 # 推送镜像
@@ -110,26 +129,35 @@ clean_images() {
show_help() { show_help() {
echo -e "${BLUE}Docker构建脚本${NC}" echo -e "${BLUE}Docker构建脚本${NC}"
echo "" echo ""
echo "用法: $0 [命令] [版本]" echo "用法: $0 [命令] [版本] [选项]"
echo "" echo ""
echo "命令:" echo "命令:"
echo " build [version] 构建Docker镜像" echo " build [version] [--skip-frontend] 构建Docker镜像"
echo " push [version] 推送镜像到Docker Hub" echo " push [version] 推送镜像到Docker Hub"
echo " clean [version] 清理Docker镜像" echo " clean [version] 清理Docker镜像"
echo " help 显示此帮助信息" echo " help 显示此帮助信息"
echo ""
echo "选项:"
echo " --skip-frontend 跳过前端构建"
echo "" echo ""
echo "示例:" echo "示例:"
echo " $0 build # 构建当前版本镜像" echo " $0 build # 构建当前版本镜像"
echo " $0 build 1.2.4 # 构建指定版本镜像" echo " $0 build 1.2.4 # 构建指定版本镜像"
echo " $0 push 1.2.4 # 推送指定版本镜像" echo " $0 build 1.2.4 --skip-frontend # 构建指定版本镜像,跳过前端"
echo " $0 clean # 清理当前版本镜像" echo " $0 push 1.2.4 # 推送指定版本镜像"
echo " $0 clean # 清理当前版本镜像"
} }
# 主函数 # 主函数
main() { main() {
case $1 in case $1 in
"build") "build")
build_docker $2 # 检查是否有 --skip-frontend 选项
local skip_frontend="false"
if [ "$3" = "--skip-frontend" ]; then
skip_frontend="true"
fi
build_docker $2 $skip_frontend
;; ;;
"push") "push")
push_images $2 push_images $2

1
web/components.d.ts vendored
View File

@@ -39,7 +39,6 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace'] NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin'] NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch'] NSwitch: typeof import('naive-ui')['NSwitch']
NTable: typeof import('naive-ui')['NTable']
NTabPane: typeof import('naive-ui')['NTabPane'] NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs'] NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag'] NTag: typeof import('naive-ui')['NTag']

View File

@@ -18,7 +18,7 @@ interface VersionResponse {
export const useVersion = () => { export const useVersion = () => {
const versionInfo = ref<VersionInfo>({ const versionInfo = ref<VersionInfo>({
version: '1.2.3', version: '1.2.4',
build_time: '', build_time: '',
git_commit: 'unknown', git_commit: 'unknown',
git_branch: 'unknown', git_branch: 'unknown',

View File

@@ -1,6 +1,6 @@
{ {
"name": "res-db-web", "name": "res-db-web",
"version": "1.2.3", "version": "1.2.4",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {