From 49b696c8987742f7a252fd7cb785556ec1ac0825 Mon Sep 17 00:00:00 2001 From: Evan Burkey Date: Thu, 24 Jul 2025 12:06:09 -0700 Subject: [PATCH] 1.0.3 --- FyneApp.toml | 4 ++-- Makefile | 2 +- main.go | 8 ++++---- pkg/utils/utils.go | 19 ------------------- 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/FyneApp.toml b/FyneApp.toml index 212fd2b..bdcda13 100644 --- a/FyneApp.toml +++ b/FyneApp.toml @@ -2,5 +2,5 @@ Icon = "Icon.png" Name = "EpochSilicon" ID = "com.burkey.epochsilicon" - Version = "1.0.1" - Build = 22 + Version = "1.0.3" + Build = 25 diff --git a/Makefile b/Makefile index 69075ab..b4965aa 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ build-release: @rm -rf ./EpochSilicon.app @echo "Building optimized release version..." CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build \ - -ldflags="-s -w" \ + -ldflags="-s -w -X main.appVersion=$$(grep Version FyneApp.toml | cut -d'"' -f2)" \ -trimpath \ -tags=release \ -o epochsilicon . diff --git a/main.go b/main.go index 16e4407..71407f3 100644 --- a/main.go +++ b/main.go @@ -11,19 +11,19 @@ import ( "strings" ) -var appVersion = semver.MustParse("1.0.1") +const appVersion = "1.0.3" func main() { log.SetupLogging() PEApp := app.NewWithID("com.burkey.epochsilicon") - PEWindow := PEApp.NewWindow("EpochSilicon v" + appVersion.String()) + PEWindow := PEApp.NewWindow("EpochSilicon v" + appVersion) PEWindow.Resize(fyne.NewSize(650, 500)) PEWindow.SetFixedSize(true) go func() { prefs, _ := utils.LoadPrefs() - updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(appVersion) + updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(semver.MustParse(appVersion)) if err != nil { log.Debugf("Failed to check for updates: %v", err) return @@ -44,7 +44,7 @@ func main() { } // Show enhanced update dialog - ui.ShowUpdateDialog(updateInfo, appVersion.String(), PEWindow) + ui.ShowUpdateDialog(updateInfo, appVersion, PEWindow) }() content := ui.CreateUI(PEWindow) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index f939e70..037fb55 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -129,25 +129,6 @@ func QuotePathForShell(path string) string { return fmt.Sprintf(`"%s"`, path) } -func CheckForUpdate(currentVersion string) (latestVersion, releaseNotes string, updateAvailable bool, err error) { - resp, err := http.Get("https://api.github.com/repos/tairasu/EpochSilicon/releases/latest") - if err != nil { - return "", "", false, err - } - defer resp.Body.Close() - - var data struct { - TagName string `json:"tag_name"` - Body string `json:"body"` - } - if err := json.NewDecoder(resp.Body).Decode(&data); err != nil { - return "", "", false, err - } - - latest := strings.TrimPrefix(data.TagName, "v") - return latest, data.Body, latest != currentVersion, nil -} - // UpdateInfo contains information about the latest release type UpdateInfo struct { TagName string `json:"tag_name"`