Skip to content

Commit

Permalink
Update version.go
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Jun 16, 2022
1 parent 78479f9 commit 6bb044a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/utils/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: LinkLeong [email protected]
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-14 11:17:16
* @LastEditTime: 2022-06-16 20:08:21
* @FilePath: /CasaOS/pkg/utils/version/version.go
* @Description:
* @Website: https://www.casaos.io
Expand Down Expand Up @@ -41,6 +41,9 @@ func IsNeedUpdate() (bool, model.Version) {
for i := 0; i < len(v1); i++ {
a, _ := strconv.Atoi(v1[i])
b, _ := strconv.Atoi(v2[i])
if i == 0 && a > b {
continue
}
if a > b {
return true, version
}
Expand Down

0 comments on commit 6bb044a

Please sign in to comment.