mirror of
https://github.com/r-smith/deceptifeed.git
synced 2025-10-23 08:22:21 +00:00
build: prevent -dirty
tag in Docker builds
Ensure Docker builds don't add a `-dirty` suffix to the version number. When building for Docker, `make` is called which in turn calls `git describe` to get the version number. Sometimes this would append `-dirty` even when clean. This change adds `git update-index -q --refresh` before calling `make` to ensure the version tag is returned correctly.
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
FROM golang:latest AS build-stage
|
FROM golang:latest AS build-stage
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN git update-index -q --refresh
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
Reference in New Issue
Block a user