Skip to content

Commit

Permalink
fix(Earthfile): Add .exe extension in the windows binaries
Browse files Browse the repository at this point in the history
This is a regression compared to the Makefile era, see for example
https://releases.crossplane.io/stable/v1.16.0/bin/windows_amd64/ and
also what install.sh expects.

Signed-off-by: Theo Chatzimichos <[email protected]>
  • Loading branch information
tampakrap committed Jun 10, 2024
1 parent 7744602 commit bc5cfbd
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 bc5cfbd

Please sign in to comment.