fix: openim images version

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
This commit is contained in:
Xinwei Xiong(cubxxw) 2023-10-27 06:22:47 +08:00
parent 9e44a39d2e
commit bf50c520c1
6 changed files with 54 additions and 17 deletions

View File

@ -130,6 +130,7 @@ GO111MODULE=on go get github.com/roboll/helmfile@latest
**Install OpenIM:** **Install OpenIM:**
```bash ```bash
mkdir ./charts/generated-configs
../scripts/genconfig.sh ../scripts/install/environment.sh ./templates/openim.yaml > ./charts/generated-configs/config.yaml ../scripts/genconfig.sh ../scripts/install/environment.sh ./templates/openim.yaml > ./charts/generated-configs/config.yaml
cp ../config/notification.yaml ./charts/generated-configs/notification.yaml cp ../config/notification.yaml ./charts/generated-configs/notification.yaml
../scripts/genconfig.sh ../scripts/install/environment.sh ./templates/helm-image.yaml > ./charts/generated-configs/helm-image.yaml ../scripts/genconfig.sh ../scripts/install/environment.sh ./templates/helm-image.yaml > ./charts/generated-configs/helm-image.yaml

View File

@ -1,3 +1,11 @@
module github.com/openimsdk/open-im-server/v3/tools/infra module github.com/openimsdk/open-im-server/v3/tools/infra
go 1.19 go 1.19
require github.com/fatih/color v1.15.0
require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
golang.org/x/sys v0.6.0 // indirect
)

10
tools/infra/go.sum Normal file
View File

@ -0,0 +1,10 @@
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

View File

@ -1,3 +1,11 @@
module github.com/openimsdk/open-im-server/v3/tools/versionchecker module github.com/openimsdk/open-im-server/v3/tools/versionchecker
go 1.19 go 1.19
require github.com/fatih/color v1.15.0
require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
golang.org/x/sys v0.6.0 // indirect
)

View File

@ -0,0 +1,10 @@
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

View File

@ -22,7 +22,7 @@ import (
"time" "time"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/openimsdk/open-im-server/v3/pkg/common/version" //"github.com/openimsdk/open-im-server/v3/pkg/common/version"
) )
func ExecuteCommand(cmdName string, args ...string) (string, error) { func ExecuteCommand(cmdName string, args ...string) (string, error) {
@ -84,20 +84,20 @@ func getGitVersion() string {
return version return version
} }
// NOTE: You'll need to provide appropriate commands for OpenIM versions. // // NOTE: You'll need to provide appropriate commands for OpenIM versions.
func getOpenIMServerVersion() string { // func getOpenIMServerVersion() string {
// Placeholder // // Placeholder
openimVersion := version.GetSingleVersion() // openimVersion := version.GetSingleVersion()
return "OpenIM Server: " + openimVersion + "\n" // return "OpenIM Server: " + openimVersion + "\n"
} // }
func getOpenIMClientVersion() (string, error) { // func getOpenIMClientVersion() (string, error) {
openIMClientVersion, err := version.GetClientVersion() // openIMClientVersion, err := version.GetClientVersion()
if err != nil { // if err != nil {
return "", err // return "", err
} // }
return "OpenIM Client: " + openIMClientVersion.ClientVersion + "\n", nil // return "OpenIM Client: " + openIMClientVersion.ClientVersion + "\n", nil
} // }
func main() { func main() {
// red := color.New(color.FgRed).SprintFunc() // red := color.New(color.FgRed).SprintFunc()
@ -117,12 +117,12 @@ func main() {
fmt.Println(getDockerComposeVersion()) fmt.Println(getDockerComposeVersion())
fmt.Println(blue("## Kubernetes Version")) fmt.Println(blue("## Kubernetes Version"))
fmt.Println(getKubernetesVersion()) fmt.Println(getKubernetesVersion())
fmt.Println(blue("## OpenIM Versions")) // fmt.Println(blue("## OpenIM Versions"))
fmt.Println(getOpenIMServerVersion()) // fmt.Println(getOpenIMServerVersion())
// clientVersion, err := getOpenIMClientVersion() // clientVersion, err := getOpenIMClientVersion()
// if err != nil { // if err != nil {
// fmt.Println(red("Error getting OpenIM Client Version: "), err) // fmt.Println(red("Error getting OpenIM Client Version: "), err)
// } else { // } else {
// fmt.Println(clientVersion) // fmt.Println(clientVersion)
// } // }
} }