1
0

feat: 跨平台发布打包,支持 7 个目标平台交叉编译和 tar.gz 分发

- 新增 scripts/release.ts,支持 7 个编译目标(linux/darwin/windows + musl 变体)
- 从 build.ts 提取共享构建逻辑到 build-common.ts,现有 build 行为不变
- 使用 tar-stream + node:zlib 创建 tar.gz,精确控制 Unix 权限位
- SHA256 校验和文件格式兼容 sha256sum -c
- 支持 --target 参数选择特定平台编译
- 新增 devDependency: tar-stream、@types/tar-stream
- 更新 README.md 和 DEVELOPMENT.md 文档
- 同步 openspec specs
This commit is contained in:
2026-05-20 23:24:36 +08:00
parent 8eac814cc6
commit ccd16a583e
13 changed files with 902 additions and 139 deletions

View File

@@ -16,6 +16,7 @@
"verify": "bun run check && bun run build",
"test": "bun test",
"clean": "bun run scripts/clean.ts",
"release": "bun run scripts/release.ts",
"typecheck": "tsc --noEmit",
"prepare": "husky",
"version:patch": "bun run scripts/bump-version.ts patch",
@@ -33,6 +34,7 @@
"@types/jsdom": "^28.0.3",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/tar-stream": "^3.1.4",
"@vitejs/plugin-react": "^6.0.2",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
@@ -46,6 +48,7 @@
"jsdom": "^29.1.1",
"lint-staged": "^17.0.4",
"prettier": "^3.8.3",
"tar-stream": "^3.2.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.59.3",
"vite": "^8.0.13"