diff --git a/deployments/README.md b/deployments/README.md index 7859da4559..9d5c80f874 100644 --- a/deployments/README.md +++ b/deployments/README.md @@ -130,6 +130,7 @@ GO111MODULE=on go get github.com/roboll/helmfile@latest **Install OpenIM:** ```bash +mkdir ./charts/generated-configs ../scripts/genconfig.sh ../scripts/install/environment.sh ./templates/openim.yaml > ./charts/generated-configs/config.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 diff --git a/tools/infra/go.mod b/tools/infra/go.mod index a6cf16c77c..8c66e2654d 100644 --- a/tools/infra/go.mod +++ b/tools/infra/go.mod @@ -1,3 +1,11 @@ module github.com/openimsdk/open-im-server/v3/tools/infra 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 +) diff --git a/tools/infra/go.sum b/tools/infra/go.sum new file mode 100644 index 0000000000..2624c9db06 --- /dev/null +++ b/tools/infra/go.sum @@ -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= diff --git a/tools/versionchecker/go.mod b/tools/versionchecker/go.mod index 619bcdb5b2..7c274fcf9b 100644 --- a/tools/versionchecker/go.mod +++ b/tools/versionchecker/go.mod @@ -1,3 +1,11 @@ module github.com/openimsdk/open-im-server/v3/tools/versionchecker 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 +) diff --git a/tools/versionchecker/go.sum b/tools/versionchecker/go.sum new file mode 100644 index 0000000000..2624c9db06 --- /dev/null +++ b/tools/versionchecker/go.sum @@ -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= diff --git a/tools/versionchecker/versionchecker.go b/tools/versionchecker/versionchecker.go index 57917cb942..12254b58e8 100644 --- a/tools/versionchecker/versionchecker.go +++ b/tools/versionchecker/versionchecker.go @@ -22,7 +22,7 @@ import ( "time" "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) { @@ -84,20 +84,20 @@ func getGitVersion() string { return version } -// NOTE: You'll need to provide appropriate commands for OpenIM versions. -func getOpenIMServerVersion() string { - // Placeholder - openimVersion := version.GetSingleVersion() - return "OpenIM Server: " + openimVersion + "\n" -} +// // NOTE: You'll need to provide appropriate commands for OpenIM versions. +// func getOpenIMServerVersion() string { +// // Placeholder +// openimVersion := version.GetSingleVersion() +// return "OpenIM Server: " + openimVersion + "\n" +// } -func getOpenIMClientVersion() (string, error) { - openIMClientVersion, err := version.GetClientVersion() - if err != nil { - return "", err - } - return "OpenIM Client: " + openIMClientVersion.ClientVersion + "\n", nil -} +// func getOpenIMClientVersion() (string, error) { +// openIMClientVersion, err := version.GetClientVersion() +// if err != nil { +// return "", err +// } +// return "OpenIM Client: " + openIMClientVersion.ClientVersion + "\n", nil +// } func main() { // red := color.New(color.FgRed).SprintFunc() @@ -117,12 +117,12 @@ func main() { fmt.Println(getDockerComposeVersion()) fmt.Println(blue("## Kubernetes Version")) fmt.Println(getKubernetesVersion()) - fmt.Println(blue("## OpenIM Versions")) - fmt.Println(getOpenIMServerVersion()) + // fmt.Println(blue("## OpenIM Versions")) + // fmt.Println(getOpenIMServerVersion()) // clientVersion, err := getOpenIMClientVersion() // if err != nil { // fmt.Println(red("Error getting OpenIM Client Version: "), err) // } else { // fmt.Println(clientVersion) // } -} \ No newline at end of file +}