This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks-controller.git


The following commit(s) were added to refs/heads/unstable by this push:
     new 43d7efa  Remove unused build flags (#192)
43d7efa is described below

commit 43d7efa5c5cc4b431fe5bdf6c18447ccec87b092
Author: hulk <[email protected]>
AuthorDate: Wed Jul 10 23:36:58 2024 +0800

    Remove unused build flags (#192)
---
 .github/workflows/ci.yaml | 14 ++------------
 build.sh                  |  6 ++----
 2 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 0b7abad..8552770 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -52,7 +52,7 @@ jobs:
           export PATH=$PATH:$GOPATH/bin
           curl -sSfL 
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh 
-s -- -b $(go env GOPATH)/bin v1.52.2
           make lint
-  
+
   build-test:
     name: Build and test
     needs: [lint]
@@ -92,14 +92,4 @@ jobs:
           file: ./coverage.out
           flags: unittests
           name: codecov-umbrella
-       
-  check-docker:
-    name: Check Docker image
-    needs: [lint]
-    runs-on: ubuntu-20.04
-    steps:
-      - uses: actions/checkout@v3
-      - uses: docker/build-push-action@v3
-        with:
-          context: .
-          push: false
+
diff --git a/build.sh b/build.sh
index 44a82c8..549531c 100644
--- a/build.sh
+++ b/build.sh
@@ -75,8 +75,6 @@ fi
 GO_PROJECT=github.com/apache/kvrocks-controller
 BUILD_DIR=./_build
 VERSION=`cat VERSION.txt`
-BUILD_DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'`
-GIT_REVISION=`git rev-parse --short HEAD`
 
 SERVER_TARGET_NAME=kvctl-server
 CLIENT_TARGET_NAME=kvctl
@@ -90,13 +88,13 @@ for TARGET_NAME in "$SERVER_TARGET_NAME" 
"$CLIENT_TARGET_NAME"; do
 
     if [[ "$BUILDER_IMAGE" == "none" ]]; then
         GOOS="$TARGET_OS" GOARCH="$TARGET_ARCH" CGO_ENABLED=0 go build -v 
-ldflags \
-            "-X $GO_PROJECT/version.Version=$VERSION -X 
$GO_PROJECT/version.BuildDate=$BUILD_DATE -X 
$GO_PROJECT/version.BuildCommit=$GIT_REVISION" \
+            "-X $GO_PROJECT/version.Version=$VERSION" \
             -o ${TARGET_NAME} ${CMD_PATH}
     else
         docker run --rm --privileged -it -v $(pwd):/${TARGET_NAME} -w 
/${TARGET_NAME} \
             -e GOOS="$TARGET_OS" -e GOARCH="$TARGET_ARCH" -e CGO_ENABLED=0 \
             $BUILDER_IMAGE go build -v -ldflags \
-            "-X $GO_PROJECT/version.Version=$VERSION -X 
$GO_PROJECT/version.BuildDate=$BUILD_DATE -X 
$GO_PROJECT/version.BuildCommit=$GIT_REVISION" \
+            "-X $GO_PROJECT/version.Version=$VERSION" \
             -o /${TARGET_NAME}/${TARGET_NAME} ${CMD_PATH}
     fi
 

Reply via email to