Skip to content

Commit

Permalink
Drop semver for version check
Browse files Browse the repository at this point in the history
  • Loading branch information
cld9x committed Jul 13, 2020
1 parent cf07a93 commit c4f5648
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/xbvr/api_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"strings"
"time"

"github.com/blang/semver"
"github.com/emicklei/go-restful"
restfulspec "github.com/emicklei/go-restful-openapi"
"github.com/jinzhu/gorm"
Expand Down Expand Up @@ -145,9 +144,7 @@ func (i ConfigResource) versionCheck(req *restful.Request, resp *restful.Respons
out.LatestVersion = gjson.Get(r.String(), "latestVersion").String()

// Decide if UI notification is needed
sLatest := semver.MustParse(out.LatestVersion)
sCurrent := semver.MustParse(common.CurrentVersion)
if sLatest.GT(sCurrent) {
if out.LatestVersion != common.CurrentVersion {
out.UpdateNotify = true
}
}
Expand Down

0 comments on commit c4f5648

Please sign in to comment.