Skip to content

Commit

Permalink
Adding mod vendor go flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarashit committed Mar 27, 2021
1 parent c326810 commit f60ca52
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 47 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@ prebuild:
mkdir -p $(BUILD_DIR)

api: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/api github.com/opensds/multi-cloud/api/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/api github.com/opensds/multi-cloud/api/cmd

backend: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/backend github.com/opensds/multi-cloud/backend/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/backend github.com/opensds/multi-cloud/backend/cmd

s3: prebuild
CGO_ENABLED=1 GOOS=linux go build -ldflags '-w -s -extldflags "-dynamic"' -o $(BUILD_DIR)/s3 github.com/opensds/multi-cloud/s3/cmd
CGO_ENABLED=1 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-dynamic"' -o $(BUILD_DIR)/s3 github.com/opensds/multi-cloud/s3/cmd

dataflow: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/dataflow github.com/opensds/multi-cloud/dataflow/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/dataflow github.com/opensds/multi-cloud/dataflow/cmd

datamover: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/datamover github.com/opensds/multi-cloud/datamover/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/datamover github.com/opensds/multi-cloud/datamover/cmd

file: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/file github.com/opensds/multi-cloud/file/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/file github.com/opensds/multi-cloud/file/cmd

block: prebuild
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o $(BUILD_DIR)/block github.com/opensds/multi-cloud/block/cmd
CGO_ENABLED=0 GOOS=linux go build -ldflags 'GOFLAGS=-mod=vendor -w -s -extldflags "-static"' -o $(BUILD_DIR)/block github.com/opensds/multi-cloud/block/cmd

docker: build

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
github.com/huaweicloud/huaweicloud-sdk-go-v3 v0.0.16-beta
github.com/journeymidnight/radoshttpd v0.0.0-20190617133011-609666b51136
github.com/journeymidnight/yig v2.0.0+incompatible
github.com/mholt/certmagic v0.9.3 // indirect
github.com/micro/go-log v0.1.0
github.com/micro/go-micro/v2 v2.9.1
github.com/micro/go-plugins/registry/kubernetes/v2 v2.9.1
Expand All @@ -40,6 +39,7 @@ require (
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.6.3
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/ugorji/go/codec v1.1.7
github.com/webrtcn/s3client v0.0.0-20200722082950-4e45a005eff3
Expand All @@ -51,6 +51,5 @@ require (
google.golang.org/protobuf v1.22.0
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
k8s.io/apimachinery v0.18.5
)
Loading

0 comments on commit f60ca52

Please sign in to comment.