Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
4545bc82c2 |
@@ -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
|
||||
|
2
Makefile
2
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 .
|
||||
|
8
main.go
8
main.go
@@ -11,19 +11,19 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
var appVersion = semver.MustParse("1.0.1")
|
||||
const appVersion = "1.0.2"
|
||||
|
||||
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)
|
||||
|
@@ -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"`
|
||||
|
Reference in New Issue
Block a user