feat(apk): 增加公开APK管理接口和CI/CD工作流
- 新增获取最新APK版本信息和下载APK的公开接口 - 更新README文档,添加APK管理接口的使用说明 - 实现CI/CD工作流,支持自动构建和部署 - 优化APK存储逻辑,确保只保留最新APK文件
This commit is contained in:
@@ -56,6 +56,10 @@ func NewUpdateService(store *storage.LocalStore, hostname string, privateKeyPath
|
||||
return &UpdateService{store: store, hostname: hostname, privateKeyPath: privateKeyPath}
|
||||
}
|
||||
|
||||
func (s *UpdateService) Hostname() string {
|
||||
return s.hostname
|
||||
}
|
||||
|
||||
func (s *UpdateService) PublishZip(runtimeVersion string, platform string, zipReader *bytes.Reader, size int64) (string, error) {
|
||||
return s.store.PublishZip(runtimeVersion, platform, zipReader, size)
|
||||
}
|
||||
@@ -80,6 +84,10 @@ func (s *UpdateService) ListAPKs() ([]model.APKInfo, error) {
|
||||
return s.store.ListAPKs()
|
||||
}
|
||||
|
||||
func (s *UpdateService) GetLatestAPK() (*model.APKInfo, error) {
|
||||
return s.store.GetLatestAPK()
|
||||
}
|
||||
|
||||
func (s *UpdateService) BuildManifestResponse(req ManifestRequest) (ManifestResponse, error) {
|
||||
releasePath, err := s.store.LatestReleasePath(req.RuntimeVersion, req.Platform)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user