From 6931488460e8b3f250ac3c7885e0305a18adb347 Mon Sep 17 00:00:00 2001 From: Abhimanyu Sharma Date: Tue, 1 Oct 2024 12:57:29 +0530 Subject: [PATCH] fix: review comments to not to add -s flag --- components/tls/Makefile | 2 +- hodometer/Makefile | 2 +- operator/Dockerfile | 2 +- operator/Makefile | 8 ++++---- scheduler/Makefile | 14 +++++++------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/tls/Makefile b/components/tls/Makefile index d8293d386c..2a6783834a 100644 --- a/components/tls/Makefile +++ b/components/tls/Makefile @@ -18,7 +18,7 @@ lint: ${.GOLANGCILINT_PATH}/golangci-lint .PHONY: build build: test - go build -trimpath -ldflags="-s -w" ./pkg/... + go build -trimpath -ldflags="-w" ./pkg/... .PHONY: licenses/dep.txt licenses/dep.txt: diff --git a/hodometer/Makefile b/hodometer/Makefile index 72f544d921..152d18504b 100644 --- a/hodometer/Makefile +++ b/hodometer/Makefile @@ -37,7 +37,7 @@ lint: ${.GOLANGCILINT_PATH}/golangci-lint .PHONY: build-hodometer build-hodometer: test-hodometer $(GO_ENV) \ - go build -trimpath -ldflags="-s -w" \ + go build -trimpath -ldflags="-w" \ -o bin/hodometer \ -ldflags=" \ -X '$(VERSION_PACKAGE).BuildVersion=$(BUILD_VERSION)' \ diff --git a/operator/Dockerfile b/operator/Dockerfile index d4a252c3ea..3a6045ab76 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -16,7 +16,7 @@ COPY operator/pkg/ pkg/ COPY operator/main.go main.go # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-w" -a -o manager main.go FROM registry.access.redhat.com/ubi9/ubi-micro:9.4-15 WORKDIR / diff --git a/operator/Makefile b/operator/Makefile index 6e89e4fcf8..212ee07343 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -88,20 +88,20 @@ test: manifests generate fmt vet envtest ## Run tests. .PHONY: build build: generate fmt vet ## Build manager binary. - go build -trimpath -ldflags="-s -w" -o bin/manager main.go + go build -trimpath -ldflags="-w" -o bin/manager main.go .PHONY: run run: manifests generate fmt vet ## Run a controller from your host. go run ./main.go build-seldon: generate fmt vet - go build -trimpath -ldflags="-s -w" -o bin/seldon -v ./cmd/seldon + go build -trimpath -ldflags="-w" -o bin/seldon -v ./cmd/seldon build-seldon-arm: generate fmt vet - GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w" -tags dynamic -o bin/seldon -v ./cmd/seldon + GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-w" -tags dynamic -o bin/seldon -v ./cmd/seldon build-seldon-docgen: - go build -trimpath -ldflags="-s -w" -o bin/seldon-gendocs -v ./cmd/seldon/docs + go build -trimpath -ldflags="-w" -o bin/seldon-gendocs -v ./cmd/seldon/docs generate-cli-docs: ./bin/seldon-gendocs --out ../docs/source/contents/cli/docs diff --git a/scheduler/Makefile b/scheduler/Makefile index e3d8615141..6e270fa1c6 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -32,31 +32,31 @@ GO_LDFLAGS := -s -w $(patsubst %,-X %, $(GO_BUILD_VARS)) .PHONY: build-scheduler build-scheduler: test-go - go build -trimpath -ldflags="-s -w" -buildvcs=false -o bin/scheduler ./cmd/scheduler + go build -trimpath -ldflags="-w" -buildvcs=false -o bin/scheduler ./cmd/scheduler .PHONY: build-proxy build-proxy: test-go - CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o bin/proxy ./cmd/proxy + CGO_ENABLED=0 go build -trimpath -ldflags="-w" -o bin/proxy ./cmd/proxy .PHONY: build-agent build-agent: test-go - CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -buildvcs=false -o bin/agent ./cmd/agent + CGO_ENABLED=0 go build -trimpath -ldflags="-w" -buildvcs=false -o bin/agent ./cmd/agent .PHONY: build-modelgateway build-modelgateway: test-go - go build -trimpath -ldflags="-s -w" -o bin/modelgateway -v ./cmd/modelgateway + go build -trimpath -ldflags="-w" -o bin/modelgateway -v ./cmd/modelgateway .PHONY: build-pipelinegateway build-pipelinegateway: test-go - go build -trimpath -ldflags="-s -w" -o bin/pipelinegateway -v ./cmd/pipelinegateway + go build -trimpath -ldflags="-w" -o bin/pipelinegateway -v ./cmd/pipelinegateway .PHONY: build-dataflow-producer build-dataflow-producer: test-jvm - go build -trimpath -ldflags="-s -w" -o data-flow/scripts/bin/producer ./data-flow/scripts/producer.go ./data-flow/scripts/common.go + go build -trimpath -ldflags="-w" -o data-flow/scripts/bin/producer ./data-flow/scripts/producer.go ./data-flow/scripts/common.go .PHONY: build-dataflow-consumer build-dataflow-consumer: - go build -trimpath -ldflags="-s -w" -o data-flow/scripts/bin/consumer ./data-flow/scripts/consumer.go ./data-flow/scripts/common.go + go build -trimpath -ldflags="-w" -o data-flow/scripts/bin/consumer ./data-flow/scripts/consumer.go ./data-flow/scripts/common.go .PHONY: build-dataflow-engine build-dataflow-engine: