Add Store MSIX packaging and dark/light theme for 2.9.0.
EOF Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+19
-12
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
// CurrentVersion is the product/semver used for update eligibility (feed "version").
|
||||
// Keep major.minor.patch only — no build suffix here.
|
||||
const CurrentVersion = "2.8.0"
|
||||
const CurrentVersion = "2.9.0"
|
||||
|
||||
// BuildNumber is the monotonic build within CurrentVersion (Windows FileVersion 4th part,
|
||||
// macOS CFBundleVersion suffix, Android versionCode low digits). Bump on every release build.
|
||||
@@ -64,17 +64,18 @@ type Manifest struct {
|
||||
|
||||
// Status is returned to the UI / CLI.
|
||||
type Status struct {
|
||||
Current string `json:"current"`
|
||||
Latest string `json:"latest,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
SHA256 string `json:"sha256,omitempty"`
|
||||
Platform string `json:"platform,omitempty"`
|
||||
Available bool `json:"available"`
|
||||
Mandatory bool `json:"mandatory"`
|
||||
Checking bool `json:"checking,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
ManifestURL string `json:"manifest_url"`
|
||||
Current string `json:"current"`
|
||||
Latest string `json:"latest,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
SHA256 string `json:"sha256,omitempty"`
|
||||
Platform string `json:"platform,omitempty"`
|
||||
Available bool `json:"available"`
|
||||
Mandatory bool `json:"mandatory"`
|
||||
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
|
||||
}
|
||||
|
||||
// PlatformKey is "GOOS-GOARCH", e.g. windows-amd64, darwin-arm64.
|
||||
@@ -192,6 +193,12 @@ func Check(ctx context.Context, manifestURL string) (Status, error) {
|
||||
}
|
||||
key := PlatformKey()
|
||||
st := Status{Current: DisplayVersion(), ManifestURL: manifestURL, Platform: key}
|
||||
if IsStorePackaged() {
|
||||
st.StoreManaged = true
|
||||
st.Available = false
|
||||
st.Notes = "Обновления через Microsoft Store"
|
||||
return st, nil
|
||||
}
|
||||
|
||||
m, err := fetchManifest(ctx, manifestURL)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user