feat: 扩展发布打包支持多组件多架构多格式产物
- 新增 web 组件独立发布为 nex-web_<version>.tar.gz
- server 新增 arm64 架构、macOS universal、Windows arm64 产物
- desktop 新增 arm64 架构支持(Linux/Windows)
- Linux desktop 新增 AppImage、deb、rpm 安装包格式
- macOS desktop 新增 unsigned DMG 安装包
- 统一发布资产命名为 {component}_{version}_{platform}_{arch}.{ext}
- 新增 SHA256SUMS 校验和清单覆盖全部发布资产
- versionctl 新增 asset-name CLI 支持按参数生成资产文件名
- Makefile release target 重构为组件/平台/架构参数化
- GitHub Actions release workflow 扩展多组件多架构构建矩阵
- 同步更新 openspec 主规范(desktop-app/release-pipeline/workspace-command-flows)
This commit is contained in:
@@ -106,8 +106,8 @@ func printMacOSPlist(root, minMacOSVersion string) error {
|
||||
}
|
||||
|
||||
func printAssetName(root string, args []string) error {
|
||||
if len(args) < 2 {
|
||||
return fmt.Errorf("asset-name 至少需要 kind 和 platform 参数")
|
||||
if len(args) == 0 {
|
||||
return fmt.Errorf("asset-name 需要组件参数: server|web|desktop")
|
||||
}
|
||||
|
||||
version, err := projectversion.ReadString(root)
|
||||
@@ -115,30 +115,31 @@ func printAssetName(root string, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
var platform, arch, format string
|
||||
switch args[0] {
|
||||
case "server":
|
||||
if len(args) != 3 {
|
||||
return fmt.Errorf("server 资产命名需要 platform 和 arch 参数")
|
||||
case "server", "desktop":
|
||||
if len(args) != 4 {
|
||||
return fmt.Errorf("%s 资产命名需要 platform、arch 和 format 参数", args[0])
|
||||
}
|
||||
name, nameErr := projectversion.ServerAssetName(version, args[1], args[2])
|
||||
if nameErr != nil {
|
||||
return nameErr
|
||||
}
|
||||
fmt.Println(name)
|
||||
return nil
|
||||
case "desktop":
|
||||
platform = args[1]
|
||||
arch = args[2]
|
||||
format = args[3]
|
||||
case "web":
|
||||
if len(args) != 2 {
|
||||
return fmt.Errorf("desktop 资产命名只需要 platform 参数")
|
||||
return fmt.Errorf("web 资产命名只需要 format 参数")
|
||||
}
|
||||
name, nameErr := projectversion.DesktopAssetName(version, args[1])
|
||||
if nameErr != nil {
|
||||
return nameErr
|
||||
}
|
||||
fmt.Println(name)
|
||||
return nil
|
||||
format = args[1]
|
||||
default:
|
||||
return fmt.Errorf("不支持的资产类型 %q", args[0])
|
||||
return fmt.Errorf("不支持的资产组件 %q", args[0])
|
||||
}
|
||||
|
||||
name, nameErr := projectversion.ReleaseAssetName(version, args[0], platform, arch, format)
|
||||
if nameErr != nil {
|
||||
return nameErr
|
||||
}
|
||||
|
||||
fmt.Println(name)
|
||||
return nil
|
||||
}
|
||||
|
||||
func mustGetwd() string {
|
||||
|
||||
Reference in New Issue
Block a user