1
0
mirror of https://github.com/kairos-io/immucore.git synced 2025-05-11 17:37:29 +00:00

Update Earthfile

This commit is contained in:
Itxaka 2024-05-16 10:57:04 +02:00 committed by GitHub
parent afca5f83f9
commit 87e9d7c3a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,18 +35,20 @@ test:
golint:
ARG GOLINT_VERSION
FROM golangci/golangci-lint:$GOLINT_VERSION
COPY . .
WORKDIR /build
RUN golangci-lint run -v
build-immucore:
FROM +go-deps
WORKDIR /build
COPY +version/VERSION ./
COPY +version/COMMIT ./
ARG VERSION=$(cat VERSION)
ARG COMMIT=$(cat COMMIT)
ARG LDFLAGS="-s -w -X github.com/kairos-io/immucore/internal/version.version=$VERSION -X github.com/kairos-io/immucore/internal/version.gitCommit=$COMMIT"
RUN echo ${LDFLAGS}
RUN CGO_ENABLED=0 go build -o immucore -ldflags "${LDFLAGS}"
SAVE ARTIFACT /build/immucore immucore AS LOCAL build/immucore-$VERSION
SAVE ARTIFACT immucore immucore AS LOCAL build/immucore-$VERSION
# Alias for ease of use
build: