Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #288

Merged
merged 22 commits into from
Jun 14, 2022
Merged

Dev #288

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [0.3.2.1] - 2022-06-13
## [0.3.2.1] - 2022-06-14

### Fixed

- Fix the problem of application opening failure on non-80 ports ([#283](https://github.com/IceWhaleTech/CasaOS/issues/283) [#280](https://github.com/IceWhaleTech/CasaOS/issues/280))
- Modify port failure problem ([#282](https://github.com/IceWhaleTech/CasaOS/issues/282))
- Modify environment variables disappearing problem([#284](https://github.com/IceWhaleTech/CasaOS/issues/284))
- Fix no update alert([#278](https://github.com/IceWhaleTech/CasaOS/issues/278))

## [0.3.2] - 2022-06-10

### Added
Expand Down
25 changes: 2 additions & 23 deletions pkg/utils/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-05-13 18:15:46
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-02 17:41:47
* @LastEditTime: 2022-06-14 11:17:16
* @FilePath: /CasaOS/pkg/utils/version/version.go
* @Description:
* @Website: https://www.casaos.io
Expand All @@ -29,6 +29,7 @@ func IsNeedUpdate() (bool, model.Version) {
json2.Unmarshal([]byte(data.String()), &version)

v1 := strings.Split(version.Version, ".")

v2 := strings.Split(types.CURRENTVERSION, ".")

for len(v1) < len(v2) {
Expand All @@ -42,29 +43,7 @@ func IsNeedUpdate() (bool, model.Version) {
b, _ := strconv.Atoi(v2[i])
if a > b {
return true, version
} else {
return false, version
}
}
return false, version
}

//a版本大于b版本
func VersionCompared(a string, b string) bool {
v1 := strings.Split(a, ".")
v2 := strings.Split(b, ".")
for len(v1) < len(v2) {
v1 = append(v1, "0")
}
for len(v2) < len(v1) {
v2 = append(v2, "0")
}
for i := 0; i < len(v1); i++ {
a, _ := strconv.Atoi(v1[i])
b, _ := strconv.Atoi(v2[i])
if a > b {
return true
}
}
return false
}
2 changes: 1 addition & 1 deletion types/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: LinkLeong link@icewhale.com
* @Date: 2022-02-17 18:53:22
* @LastEditors: LinkLeong
* @LastEditTime: 2022-06-13 19:24:15
* @LastEditTime: 2022-06-14 08:58:14
* @FilePath: /CasaOS/types/system.go
* @Description:
* @Website: https://www.casaos.io
Expand Down