Compare commits

..

1 Commits

Author SHA1 Message Date
Xinwei Xiong(cubxxw) bf50c520c1 fix: openim images version
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
2023-10-27 06:22:47 +08:00
21 changed files with 111 additions and 75 deletions
+2 -2
View File
@@ -5,6 +5,6 @@ WORKDIR ${SERVER_WORKDIR}
# Set HTTP proxy # Set HTTP proxy
ARG BINARY_NAME ARG BINARY_NAME
COPY BINARY_NAME ./BINARY_NAME COPY BINARY_NAME ./bin/BINARY_NAME
ENTRYPOINT ["./BINARY_NAME"] ENTRYPOINT ["./bin/BINARY_NAME"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-api ./openim-api COPY --from=builder /usr/bin/openim-api ./bin/openim-api
ENTRYPOINT ["./openim-api"] ENTRYPOINT ["./bin/openim-api"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -36,10 +36,10 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-cmdutils ./openim-cmdutils COPY --from=builder /usr/bin/openim-cmdutils ./bin/openim-cmdutils
ENTRYPOINT ["./openim-cmdutils"] ENTRYPOINT ["./bin/openim-cmdutils"]
CMD ["--help"] CMD ["--help"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-crontask ./openim-crontask COPY --from=builder /usr/bin/openim-crontask ./bin/openim-crontask
ENTRYPOINT ["./openim-crontask"] ENTRYPOINT ["./bin/openim-crontask"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-msggateway ./openim-msggateway COPY --from=builder /usr/bin/openim-msggateway ./bin/openim-msggateway
ENTRYPOINT ["./openim-msggateway"] ENTRYPOINT ["./bin/openim-msggateway"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-msgtransfer ./openim-msgtransfer COPY --from=builder /usr/bin/openim-msgtransfer ./bin/openim-msgtransfer
ENTRYPOINT ["./openim-msgtransfer"] ENTRYPOINT ["./bin/openim-msgtransfer"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-push ./openim-push COPY --from=builder /usr/bin/openim-push ./bin/openim-push
ENTRYPOINT ["./openim-push"] ENTRYPOINT ["./bin/openim-push"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-auth ./openim-rpc-auth COPY --from=builder /usr/bin/openim-rpc-auth ./bin/openim-rpc-auth
ENTRYPOINT ["./openim-rpc-auth"] ENTRYPOINT ["./bin/openim-rpc-auth"]
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-conversation ./openim-rpc-conversation COPY --from=builder /usr/bin/openim-rpc-conversation ./bin/openim-rpc-conversation
ENTRYPOINT ["./openim-rpc-conversation"] ENTRYPOINT ["./bin/openim-rpc-conversation"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-friend ./openim-rpc-friend COPY --from=builder /usr/bin/openim-rpc-friend ./bin/openim-rpc-friend
ENTRYPOINT ["./openim-rpc-friend"] ENTRYPOINT ["./bin/openim-rpc-friend"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-group ./openim-rpc-group COPY --from=builder /usr/bin/openim-rpc-group ./bin/openim-rpc-group
ENTRYPOINT ["./openim-rpc-group"] ENTRYPOINT ["./bin/openim-rpc-group"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-msg ./openim-rpc-msg COPY --from=builder /usr/bin/openim-rpc-msg ./bin/openim-rpc-msg
ENTRYPOINT ["./openim-rpc-msg"] ENTRYPOINT ["./bin/openim-rpc-msg"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-third ./openim-rpc-third COPY --from=builder /usr/bin/openim-rpc-third ./bin/openim-rpc-third
ENTRYPOINT ["./openim-rpc-third"] ENTRYPOINT ["./bin/openim-rpc-third"]
+4 -4
View File
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -38,8 +38,8 @@ RUN cp /openim/openim-server/_output/bin/platforms/$(go env GOOS)/$(go env GOARC
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /usr/bin/openim-rpc-user ./openim-rpc-user COPY --from=builder /usr/bin/openim-rpc-user ./bin/openim-rpc-user
ENTRYPOINT ["./openim-rpc-user"] ENTRYPOINT ["./bin/openim-rpc-user"]
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -37,7 +37,7 @@ RUN make build BINS=component
# FROM ghcr.io/openim-sigs/openim-bash-image:latest # FROM ghcr.io/openim-sigs/openim-bash-image:latest
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/ COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/
COPY --from=builder /openim/openim-server/config /openim/openim-server/config COPY --from=builder /openim/openim-server/config /openim/openim-server/config
@@ -21,7 +21,7 @@ FROM golang:1.20 AS builder
ARG GO111MODULE=on ARG GO111MODULE=on
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
ENV GO111MODULE=$GO111MODULE ENV GO111MODULE=$GO111MODULE
ENV GOPROXY=$GOPROXY ENV GOPROXY=$GOPROXY
@@ -42,7 +42,7 @@ RUN make build BINS=openim-web
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
WORKDIR /openim/openim-server/bin WORKDIR /openim/openim-server
COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/ COPY --from=builder /openim/openim-server/_output/bin/tools /openim/openim-server/_output/bin/tools/
COPY --from=builder /openim/openim-server/dist /openim/openim-server/dist COPY --from=builder /openim/openim-server/dist /openim/openim-server/dist
+8
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
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=
+8
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
)
+10
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=
+17 -17
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)
// } // }
} }