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:
parent
afca5f83f9
commit
87e9d7c3a5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user