mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
basic check if a specific commit is in use (#2107)
This commit is contained in:
@@ -2,6 +2,7 @@ package gomod
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/Masterminds/semver"
|
||||
"golang.org/x/mod/modfile"
|
||||
@@ -39,6 +40,12 @@ func GoModOutOfSync(goModData []byte, currentVersion string) (bool, error) {
|
||||
return false, fmt.Errorf("Unable to find Wails in go.mod")
|
||||
}
|
||||
|
||||
// check if a specific patch is targetted by a commit
|
||||
// i.e. - v2.2.1-0.20221117091924-a8bbce6a126b
|
||||
if strings.Contains(gomodversion.Original(), "-") {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
result, err := semver.NewVersion(currentVersion)
|
||||
if err != nil || result == nil {
|
||||
return false, fmt.Errorf("Unable to parse Wails version: %s", currentVersion)
|
||||
|
||||
Reference in New Issue
Block a user