Skip to content

Commit

Permalink
Merge pull request crossplane#5781 from tampakrap/earthfile_crank_exe
Browse files Browse the repository at this point in the history
fix(Earthfile): Add .exe extension in the windows binaries
  • Loading branch information
negz authored Jun 12, 2024
2 parents 7744602 + bc5cfbd commit 69fd693
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,16 @@ go-build:
ARG GOFLAGS="-ldflags=-X=github.com/crossplane/crossplane/internal/version.version=${CROSSPLANE_VERSION}"
ARG CGO_ENABLED=0
FROM +go-modules
LET ext = ""
IF [ "$GOOS" = "windows" ]
SET ext = ".exe"
END
CACHE --id go-build --sharing shared /root/.cache/go-build
COPY --dir apis/ cmd/ internal/ pkg/ .
RUN go build -o crossplane ./cmd/crossplane
RUN go build -o crank ./cmd/crank
SAVE ARTIFACT crossplane AS LOCAL _output/bin/${GOOS}_${GOARCH}/crossplane
SAVE ARTIFACT crank AS LOCAL _output/bin/${GOOS}_${GOARCH}/crank
RUN go build -o crossplane${ext} ./cmd/crossplane
RUN go build -o crank${ext} ./cmd/crank
SAVE ARTIFACT crossplane${ext} AS LOCAL _output/bin/${GOOS}_${GOARCH}/crossplane${ext}
SAVE ARTIFACT crank${ext} AS LOCAL _output/bin/${GOOS}_${GOARCH}/crank${ext}

# go-multiplatform-build builds Crossplane binaries for all supported OS
# and architectures.
Expand Down

0 comments on commit 69fd693

Please sign in to comment.