Skip to content

Commit

Permalink
chore: update ZentaoDevOPS version constants, add version info and files
Browse files Browse the repository at this point in the history
- Update the `DefaultZentaoDevOPSOSSVersion` constant from `18.10` to `18.11`
- Update the `DefaultZentaoDevOPSMaxVersion` constant from `4.10` to `4.11`
- Update the `DefaultZentaoDevOPSBizVersion` constant from `8.10` to `8.11`
- Update the `DefaultZentaoDevOPSIPDVersion` constant from `1.2` to `1.3`
- Add a `versionInfo` struct with fields `Latest`, `Stable`, and `Dev`
- Write the `nextVersion` to the file `VERSION`
- Write the `versionInfo` struct as JSON to the file `version.json`

Signed-off-by: ysicing <[email protected]>
  • Loading branch information
ysicing committed Feb 26, 2024
1 parent f2dddd4 commit 5e10f4b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
8 changes: 4 additions & 4 deletions common/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const (
const (
DefaultQuickonOSSVersion = "3.0.2" // 开源版本
DefaultQuickonEEVersion = "1.0"
DefaultZentaoDevOPSOSSVersion = "18.10"
DefaultZentaoDevOPSMaxVersion = "4.10"
DefaultZentaoDevOPSBizVersion = "8.10"
DefaultZentaoDevOPSIPDVersion = "1.2"
DefaultZentaoDevOPSOSSVersion = "18.11"
DefaultZentaoDevOPSMaxVersion = "4.11"
DefaultZentaoDevOPSBizVersion = "8.11"
DefaultZentaoDevOPSIPDVersion = "1.3"
K3sBinName = "k3s"
K3sBinPath = "/usr/local/bin/k3s"
HelmBinName = "helm"
Expand Down
17 changes: 16 additions & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package main

import (
"encoding/json"
"strings"

"github.com/easysoft/qcadmin/cmd"
Expand All @@ -17,6 +18,12 @@ import (
doc "github.com/ysicing/cobra2vitepress"
)

type versionInfo struct {
Latest string `json:"latest"`
Stable string `json:"stable"`
Dev string `json:"dev"`
}

func main() {
f := factory.DefaultFactory()
q := cmd.BuildRoot(f)
Expand All @@ -32,5 +39,13 @@ func main() {
if err != nil {
return
}
file.WriteFile("VERSION", strings.TrimPrefix(version.Next(tag.Name, false, false, true), "v"), true)
nextVersion := strings.TrimPrefix(version.Next(tag.Name, false, false, true), "v")
file.WriteFile("VERSION", nextVersion, true)
v := versionInfo{
Latest: nextVersion,
Stable: nextVersion,
Dev: nextVersion,
}
jsonData, _ := json.MarshalIndent(v, "", " ")
file.WriteFile("version.json", string(jsonData), true)
}
8 changes: 4 additions & 4 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "3.0.14",
"stable": "3.0.14",
"dev": "3.0.14"
}
"latest": "3.0.14",
"stable": "3.0.14",
"dev": "3.0.14"
}

0 comments on commit 5e10f4b

Please sign in to comment.