Skip to content

Commit 1909582

Browse files
committed
feat: 发布计划功能 + v1.2.0 发版准备
- 新增发布计划功能(创建/分析/执行/SSE 实时推送) - 版本范围解析库 semverutil - Dashboard 操作卡片替换为包管理/团队管理/发布计划 - 文档站点添加发布计划用户手册及截图 - 删除根目录 assets/(已迁移到 docs-site) - 修复 cjrepo version 硬编码问题 - Release workflow 注入 ldflags 版本信息
1 parent 9d7ef83 commit 1909582

53 files changed

Lines changed: 3440 additions & 75 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ jobs:
3535
run: cd docs-site && pnpm install --frozen-lockfile && DOCS_BASE=/cjrepo/docs/ pnpm build
3636

3737
- name: 构建 Linux amd64
38-
run: CGO_ENABLED=1 go build -o cjrepo-linux-amd64 .
38+
run: |
39+
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
40+
GIT_COMMIT=$(git rev-parse --short HEAD)
41+
GIT_VERSION=${GITHUB_REF_NAME#v}
42+
CGO_ENABLED=1 go build \
43+
-ldflags "-w -s -X 'main.buildDate=$BUILD_DATE' -X 'main.gitCommit=$GIT_COMMIT' -X 'main.gitVersion=$GIT_VERSION'" \
44+
-o cjrepo-linux-amd64 .
3945
env:
4046
GOOS: linux
4147
GOARCH: amd64

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ storage
55
cjrepo
66
cjrepo.db
77
dist
8-
logs
8+
logs
9+
cangjie-workspace
10+
/assets

AGENTS.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
## 相关工具
1111
- `gh` 访问github, 回复和提交需要经过用户同意
1212
- 代理: `export https_proxy=http://192.168.3.6:1080`
13-
- 可以使用terminal-control运行后台任务
13+
- 可以使用terminal-control运行后台任务, 不要使用&运行后台任务
1414
- 可以使用agent browser来访问、调试网页
1515

1616
## 构建
@@ -42,14 +42,28 @@ export CJREPO_ADMIN_KEY=your-secret-key
4242
## 架构
4343

4444
```
45-
internal/
46-
├── handlers/ # HTTP 处理器(publish/download/index/admin/public)
47-
├── protocol/ # cjpm 二进制协议解析器
48-
├── storage/ # 文件存储(storage/{org}/{name}/{version}.cjp)
49-
├── models/ # XORM 数据模型
50-
├── auth/ # JWT 认证服务
51-
├── middleware/ # JWT 中间件
52-
└── upstream/ # 上游源代理同步
45+
cjrepo/
46+
├── internal/ # Go 后端
47+
│ ├── handlers/ # HTTP 处理器(publish/download/index/admin/public)
48+
│ ├── protocol/ # cjpm 二进制协议解析器
49+
│ ├── storage/ # 文件存储(storage/{org}/{name}/{version}.cjp)
50+
│ ├── models/ # XORM 数据模型
51+
│ ├── auth/ # JWT 认证服务
52+
│ ├── middleware/ # JWT 中间件
53+
│ └── upstream/ # 上游源代理同步
54+
├── frontend/ # Vue 3 + Element Plus 管理后台(go:embed 嵌入后端)
55+
│ ├── src/
56+
│ │ ├── views/ # 页面组件
57+
│ │ ├── layouts/ # 布局组件
58+
│ │ ├── api/ # API 类型定义和请求
59+
│ │ ├── stores/ # Pinia 状态管理
60+
│ │ └── components/ # 通用组件
61+
│ └── package.json
62+
├── docs-site/ # VitePress 文档站点(go:embed 嵌入后端)
63+
│ ├── docs/ # Markdown 文档
64+
│ └── package.json
65+
└── tests/ # 测试
66+
└── web/ # 前端功能测试 workflow
5367
```
5468

5569
## cjpm 协议端点

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ cd cjrepo
1010
docker-compose up -d
1111
```
1212

13-
访问 http://localhost:8060 进入管理后台。
13+
访问 http://localhost:8060/admin 进入管理后台。
1414

1515
## 文档
1616

assets/admin_dashboard.png

-103 KB
Binary file not shown.

assets/admin_log.png

-98.8 KB
Binary file not shown.

assets/admin_org.png

-113 KB
Binary file not shown.

assets/admin_packages.png

-109 KB
Binary file not shown.

assets/admin_upstream.png

-102 KB
Binary file not shown.

assets/admin_users.png

-99.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)