feat: update button (download, verify, stage)

This commit is contained in:
fsylvain committed 2026-10-01 18:13:45 +02:00
1 parent 834493a4f5
commit 70460e4170
41 files changed
+5345 -97

No files matched your search

@@ -0,0 +1,26 @@
package update
import (
domain "RenewCMS/internal/domain/update"
"encoding/json"
"os"
)
type FileHelperDetector struct {
statusPath string
}
var _ domain.HelperDetector = &FileHelperDetector{}
func NewFileHelperDetector(statusPath string) *FileHelperDetector {
return &FileHelperDetector{statusPath: statusPath}
}
func (d *FileHelperDetector) Installed() bool {
content, err := os.ReadFile(d.statusPath)
if err != nil {
return false
}
var status map[string]any
return json.Unmarshal(content, &status) == nil && status != nil
}