actually we gonna use git describe for docker build

This commit is contained in:
zricethezav committed 2021-11-22 11:46:24 -06:00
1 parent e796458763
commit c017b763f3
1 file changed
+1 -1
+1 -1
View File
@@ -1,7 +1,7 @@
FROM golang:1.17 AS build
WORKDIR /go/src/github.com/zricethezav/gitleaks
COPY . .
RUN VERSION=$(git tag | tail -1) && \
RUN VERSION=$(git describe --tags --abbrev=0) && \
GO111MODULE=on CGO_ENABLED=0 go build -o bin/gitleaks -ldflags "-X="github.com/zricethezav/gitleaks/v8/cmd.Version=${VERSION}
FROM alpine:3.14.2