Fix 4.2.7+1: restore UTF-8 in update.go (em-dash/RU strings) and rebuild Windows binaries + feed SHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-08-02 12:52:05 +03:00
co-authored by Cursor
parent fa3e11216e
commit c370e089ef
8 changed files with 14 additions and 14 deletions
+8 -8
View File
@@ -17,7 +17,7 @@ import (
)
// CurrentVersion is the product/semver used for update eligibility (feed "version").
// Keep major.minor.patch only — no build suffix here.
// Keep major.minor.patch only no build suffix here.
const CurrentVersion = "4.2.7"
// BuildNumber is the monotonic build within CurrentVersion (Windows FileVersion 4th part,
@@ -75,7 +75,7 @@ type Status struct {
Checking bool `json:"checking,omitempty"`
Error string `json:"error,omitempty"`
ManifestURL string `json:"manifest_url"`
StoreManaged bool `json:"store_managed,omitempty"` // MSIX / Microsoft Store — no in-app updates
StoreManaged bool `json:"store_managed,omitempty"` // MSIX / Microsoft Store no in-app updates
}
// PlatformKey is "GOOS-GOARCH", e.g. windows-amd64, darwin-arm64.
@@ -86,7 +86,7 @@ func PlatformKey() string {
// AssetFor returns download URL + checksum for the given platform key.
//
// Rules (critical):
// - Only the asset for this OS/arch is considered — never another OS.
// - Only the asset for this OS/arch is considered never another OS.
// - If the feed has a newer version but no matching platform asset, ok=false
// (caller must treat Available as false).
// - Darwin may fall back to "darwin-universal" when the exact arch key is absent.
@@ -196,7 +196,7 @@ func Check(ctx context.Context, manifestURL string) (Status, error) {
if IsStorePackaged() {
st.StoreManaged = true
st.Available = false
st.Notes = "Обновления через Microsoft Store"
st.Notes = "Обновления через Microsoft Store"
return st, nil
}
@@ -212,7 +212,7 @@ func Check(ctx context.Context, manifestURL string) (Status, error) {
url, sha, ok := m.AssetFor(key)
if !ok {
// Higher feed version for another OS must NOT count as available here.
st.Error = fmt.Sprintf("нет сборки для %s", key)
st.Error = fmt.Sprintf("нет сборки для %s", key)
st.Available = false
return st, nil
}
@@ -254,7 +254,7 @@ func productParts(v string) [3]int {
func splitVer(v string) []int {
v = strings.TrimPrefix(strings.TrimSpace(v), "v")
// Strip build metadata: 2.7.2+1 / 2.7.2-beta в†’ compare product only.
// Strip build metadata: 2.7.2+1 / 2.7.2-beta compare product only.
if i := strings.IndexAny(v, "+-"); i >= 0 {
v = v[:i]
}
@@ -353,10 +353,10 @@ func prepareDownload(ctx context.Context, manifestURL string) (latest, url, sha,
if st.Error != "" {
return "", "", "", "", "", fmt.Errorf("%s", st.Error)
}
return "", "", "", "", "", fmt.Errorf("уже актуальная версия %s (канал %s)", DisplayVersion(), st.Latest)
return "", "", "", "", "", fmt.Errorf("уже актуальная версия %s (канал %s)", DisplayVersion(), st.Latest)
}
if !allowedDownloadURL(st.URL) {
return "", "", "", "", "", fmt.Errorf("URL обновления должен быть на git.de4ima.uk, git.evilfox.cc или files.de4ima.uk")
return "", "", "", "", "", fmt.Errorf("URL обновления должен быть на git.de4ima.uk, git.evilfox.cc или files.de4ima.uk")
}
exe, err := os.Executable()
if err != nil {