Skip to content

Commit

Permalink
fix: openim images version
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>
  • Loading branch information
cubxxw committed Oct 26, 2023
1 parent 9e44a39 commit bf50c52
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 17 deletions.
1 change: 1 addition & 0 deletions deployments/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions tools/infra/go.mod
Original file line number Diff line number Diff line change
@@ -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
)
10 changes: 10 additions & 0 deletions tools/infra/go.sum
Original file line number Diff line number Diff line change
@@ -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=
8 changes: 8 additions & 0 deletions tools/versionchecker/go.mod
Original file line number Diff line number Diff line change
@@ -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
)
10 changes: 10 additions & 0 deletions tools/versionchecker/go.sum
Original file line number Diff line number Diff line change
@@ -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=
34 changes: 17 additions & 17 deletions tools/versionchecker/versionchecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand All @@ -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)
// }
}
}

0 comments on commit bf50c52

Please sign in to comment.