mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-24 16:39:17 +00:00
Update Earthfile
This commit is contained in:
parent
afca5f83f9
commit
87e9d7c3a5
@ -35,18 +35,20 @@ test:
|
|||||||
golint:
|
golint:
|
||||||
ARG GOLINT_VERSION
|
ARG GOLINT_VERSION
|
||||||
FROM golangci/golangci-lint:$GOLINT_VERSION
|
FROM golangci/golangci-lint:$GOLINT_VERSION
|
||||||
|
COPY . .
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
RUN golangci-lint run -v
|
RUN golangci-lint run -v
|
||||||
|
|
||||||
build-immucore:
|
build-immucore:
|
||||||
FROM +go-deps
|
FROM +go-deps
|
||||||
WORKDIR /build
|
COPY +version/VERSION ./
|
||||||
|
COPY +version/COMMIT ./
|
||||||
ARG VERSION=$(cat VERSION)
|
ARG VERSION=$(cat VERSION)
|
||||||
ARG COMMIT=$(cat COMMIT)
|
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"
|
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 echo ${LDFLAGS}
|
||||||
RUN CGO_ENABLED=0 go build -o immucore -ldflags "${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
|
# Alias for ease of use
|
||||||
build:
|
build:
|
||||||
|
Loading…
Reference in New Issue
Block a user