3 Commits

Author SHA1 Message Date
ef70ebc12c deprecation notice 2025-08-12 15:39:00 +00:00
92c1ce74e5 1.1.2 2025-08-08 09:59:07 -07:00
8e5a94e8d8 actually fix version updates 2025-08-08 09:58:46 -07:00
2 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
# Deprecation Notice
Due to Project Epoch moving to the Ascension platform, epochcli is now no longer necessary and I am no longer maintaining this software.
# epochcli # epochcli
CLI tool for updating and launching [Project Epoch](https://www.project-epoch.net/) on Windows, Linux and macOS. CLI tool for updating and launching [Project Epoch](https://www.project-epoch.net/) on Windows, Linux and macOS.

View File

@@ -10,7 +10,7 @@ import (
) )
const ( const (
version = "1.1.1" version = "1.1.2"
versionUrl = "https://git.burkey.co/eburk/epochcli/raw/branch/master/version.go" versionUrl = "https://git.burkey.co/eburk/epochcli/raw/branch/master/version.go"
) )
@@ -30,7 +30,6 @@ func needUpdate() (bool, error) {
return false, fmt.Errorf("unable to read response body: %v", err) return false, fmt.Errorf("unable to read response body: %v", err)
} }
fmt.Println(string(b))
re := regexp.MustCompile(`version\s+=\s+"(\d+.\d+.\d+)"`) re := regexp.MustCompile(`version\s+=\s+"(\d+.\d+.\d+)"`)
ver := re.FindStringSubmatch(string(b)) ver := re.FindStringSubmatch(string(b))
if ver[1] == "" { if ver[1] == "" {
@@ -47,5 +46,10 @@ func needUpdate() (bool, error) {
return false, fmt.Errorf("unable to parse new version to semver: %v", err) return false, fmt.Errorf("unable to parse new version to semver: %v", err)
} }
return curVer != newVer, nil if curVer.LessThan(newVer) {
fmt.Println("Current Version: ", curVer)
fmt.Println("Latest Version: ", newVer)
return true, nil
}
return false, nil
} }