소스 검색

remove git fetch tag from docker build process, already available

zricethezav 4 년 전
부모
커밋
2a9fbbc64d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Dockerfile

+ 1 - 1
Dockerfile

@@ -1,7 +1,7 @@
 FROM golang:1.17 AS build
 WORKDIR /go/src/github.com/zricethezav/gitleaks
 COPY . .
-RUN VERSION=$(git fetch --tags https://github.com/zricethezav/gitleaks.git && git tag | sort -V | tail -1) && \
+RUN VERSION=$(git tag | sort -V | tail -1) && \
 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