mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 04:33:29 +00:00
fix: BUILDFLAGS updated with correct versions information (#672)
This commit is contained in:
parent
5b3d23117c
commit
8b90c95c07
1 changed files with 3 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -2,7 +2,8 @@ GIT_TAG?= $(shell git describe --always --tags)
|
||||||
BIN = gosec
|
BIN = gosec
|
||||||
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
|
FMT_CMD = $(gofmt -s -l -w $(find . -type f -name '*.go' -not -path './vendor/*') | tee /dev/stderr)
|
||||||
IMAGE_REPO = securego
|
IMAGE_REPO = securego
|
||||||
BUILDFLAGS := '-w -s'
|
BUILD_DATE ?= $(shell date +%Y-%m-%d)
|
||||||
|
BUILDFLAGS := "-w -s -X 'main.Version=$(GIT_TAG)' -X 'main.GitTag=$(GIT_TAG)' -X 'main.BuildDate=$(BUILD_DATE)'"
|
||||||
CGO_ENABLED = 0
|
CGO_ENABLED = 0
|
||||||
GO := GO111MODULE=on go
|
GO := GO111MODULE=on go
|
||||||
GO_NOMOD :=GO111MODULE=off go
|
GO_NOMOD :=GO111MODULE=off go
|
||||||
|
@ -55,7 +56,7 @@ release:
|
||||||
goreleaser release
|
goreleaser release
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags $(BUILDFLAGS) -o $(BIN) ./cmd/gosec/
|
CGO_ENABLED=$(CGO_ENABLED) GOOS=linux GOARCH=amd64 go build -ldflags=$(BUILDFLAGS) -o $(BIN) ./cmd/gosec/
|
||||||
|
|
||||||
image:
|
image:
|
||||||
@echo "Building the Docker image..."
|
@echo "Building the Docker image..."
|
||||||
|
|
Loading…
Reference in a new issue