Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 6fdfbf2

Browse files
committed
Build for windows when building on linux
1 parent ac39d3c commit 6fdfbf2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ci/steps/build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ popd() { builtin popd >/dev/null; }
77
set -euo pipefail
88
cd "$(dirname "$0")"
99

10-
export GOARCH=amd64
1110
tag=$(git describe --tags)
1211

1312
build() {
13+
echo "Building coder-cli for $GOOS-$GOARCH..."
14+
1415
tmpdir=$(mktemp -d)
1516
go build -ldflags "-X main.version=${tag}" -o "$tmpdir/coder" ../../cmd/coder
1617

@@ -33,12 +34,11 @@ build() {
3334
# Darwin builds do not work from Linux, so only try to build them from Darwin.
3435
# See: https://github.com/cdr/coder-cli/issues/20
3536
if [[ "$(uname)" == "Darwin" ]]; then
36-
GOOS=linux build
37-
CGO_ENABLED=1 GOOS=darwin build
38-
GOOS=windows GOARCH=386 build
39-
exit 0
37+
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 build
38+
else
39+
echo "Warning: Darwin builds don't work on Linux."
40+
echo "Please use an OSX machine to build Darwin tars."
4041
fi
4142

42-
echo "Warning: Darwin builds don't work on Linux."
43-
echo "Please use an OSX machine to build Darwin tars."
44-
GOOS=linux build
43+
GOOS=linux GOARCH=amd64 build
44+
GOOS=windows GOARCH=386 build

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy