Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: no need to prepend git commit hash in the version (#1556)

tianzhou57f9176edf19
diff --git a/Dockerfile.render b/Dockerfile.render
index 545e0a6cc5..686499da2d 100644
--- a/Dockerfile.render
+++ b/Dockerfile.render
@@ -41,7 +41,7 @@ COPY ./scripts .
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
# go-sqlite3 requires CGO_ENABLED
-RUN CMD_VERSION=`cat ./VERSION`-${RENDER_GIT_COMMIT:0:5} && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
+RUN CMD_VERSION=`cat ./VERSION` && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
--tags "${RELEASE} alpine" \
-ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/server/cmd.version=${CMD_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=${RENDER_GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=${BUILD_USER}'" \
-o bytebase \
diff --git a/Dockerfile.render-preview b/Dockerfile.render-preview
index c1d232604d..5160928d0a 100644
--- a/Dockerfile.render-preview
+++ b/Dockerfile.render-preview
@@ -43,7 +43,7 @@ COPY ./scripts .
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
# go-sqlite3 requires CGO_ENABLED
-RUN CMD_VERSION=`cat ./VERSION`-${RENDER_GIT_COMMIT:0:5} && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
+RUN CMD_VERSION=`cat ./VERSION` && CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
--tags "${RELEASE} alpine" \
-ldflags="-w -s -X 'github.com/bytebase/bytebase/bin/server/cmd.version=${CMD_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/bin/server/cmd.gitcommit=${RENDER_GIT_COMMIT}' -X 'github.com/bytebase/bytebase/bin/server/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/bin/server/cmd.builduser=${BUILD_USER}'" \
-o bytebase \