diff --git a/Dockerfile b/Dockerfile index 0d29481d..761f3897 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.23 AS build WORKDIR /go/src/github.com/zricethezav/gitleaks COPY . . RUN VERSION=$(git describe --tags --abbrev=0) && \ -CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X=github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION}" +CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X=github.com/zricethezav/gitleaks/v8/version.Version=${VERSION}" FROM alpine:3.19 RUN apk add --no-cache bash git openssh-client diff --git a/Makefile b/Makefile index 17a14003..7c7112cc 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PKG=github.com/zricethezav/gitleaks VERSION := `git fetch --tags && git tag | sort -V | tail -1` -LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/v8/cmd.Version=$(VERSION)" +LDFLAGS=-ldflags "-X=github.com/zricethezav/gitleaks/v8/version.Version=$(VERSION)" COVER=--cover --coverprofile=cover.out test-cover: