Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Build for windows when building on linux#126

Merged
deansheather merged 1 commit intomasterfrombuild-windows-on-linux
Sep 15, 2020
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletionsci/steps/build.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,10 +7,11 @@ popd() { builtin popd >/dev/null; }
set -euo pipefail
cd "$(dirname "$0")"

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

build() {
echo "Building coder-cli for $GOOS-$GOARCH..."

tmpdir=$(mktemp -d)
go build -ldflags "-X main.version=${tag}" -o "$tmpdir/coder" ../../cmd/coder

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

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

[8]ページ先頭

©2009-2025 Movatter.jp