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

Commit 3746bf5

Browse files
committed
Delete GOARCH=386 from windows build
1 parent 4a7aca7 commit 3746bf5

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

.github/workflows/release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
- name: Upload windows
2323
uses: actions/upload-artifact@v2
2424
with:
25-
name: coder-cli-windows-386
26-
path: ./ci/bin/coder-cli-windows-386.zip
25+
name: coder-cli-windows
26+
path: ./ci/bin/coder-cli-windows.zip
2727
build_darwin:
2828
name: Build darwin binary
2929
runs-on: macos-latest
@@ -74,7 +74,7 @@ jobs:
7474
draft: true
7575
prerelease: false
7676
- name: Upload Linux Release
77-
id: upload-linux-release-asset
77+
id: upload-linux-release-asset
7878
uses: actions/upload-release-asset@v1
7979
env:
8080
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -84,7 +84,7 @@ jobs:
8484
asset_name: coder-cli-linux-amd64.tar.gz
8585
asset_content_type: application/tar+gzip
8686
- name: Upload MacOS Release
87-
id: upload-macos-release-asset
87+
id: upload-macos-release-asset
8888
uses: actions/upload-release-asset@v1
8989
env:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -94,12 +94,12 @@ jobs:
9494
asset_name: coder-cli-darwin-amd64.zip
9595
asset_content_type: application/zip
9696
- name: Upload Windows Release
97-
id: upload-windows-release-asset
97+
id: upload-windows-release-asset
9898
uses: actions/upload-release-asset@v1
9999
env:
100100
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101101
with:
102102
upload_url: ${{ steps.create_release.outputs.upload_url }}
103-
asset_path: coder-cli-windows-386/coder-cli-windows-386.zip
104-
asset_name: coder-cli-windows-386.zip
103+
asset_path: coder-cli-windows/coder-cli-windows.zip
104+
asset_name: coder-cli-windows.zip
105105
asset_content_type: application/zip

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Makefile for Coder CLI
1+
# Makefile for Coder CLI
22

33
.PHONY: clean build build/macos build/windows build/linux fmt lint gendocs test/go dev
44

@@ -14,7 +14,7 @@ build/macos:
1414
# requires darwin
1515
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 ./ci/scripts/build.sh
1616
build/windows:
17-
CGO_ENABLED=0 GOOS=windows GOARCH=386 ./ci/scripts/build.sh
17+
CGO_ENABLED=0 GOOS=windows ./ci/scripts/build.sh
1818
build/linux:
1919
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./ci/scripts/build.sh
2020

ci/scripts/build.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ set -euo pipefail
88

99
cd "$(git rev-parse --show-toplevel)/ci/scripts"
1010

11-
tag=$(git describe --tags)
11+
tag="$(git describe --tags)"
1212

13-
echo "--- building coder-cli for $GOOS-$GOARCH"
13+
flavor="$GOOS"
14+
if [[ "$GOOS" == "windows" ]]; then
15+
unset GOARCH
16+
else
17+
flavor+="-$GOARCH"
18+
fi
19+
echo "--- building coder-cli for $flavor"
1420

15-
tmpdir=$(mktemp -d)
21+
tmpdir="$(mktemp -d)"
1622
go build -ldflags "-X cdr.dev/coder-cli/internal/version.Version=${tag}" -o "$tmpdir/coder" ../../cmd/coder
1723

1824
cp ../gon.json $tmpdir/gon.json
1925

2026
pushd "$tmpdir"
2127
case "$GOOS" in
2228
"windows")
23-
artifact="coder-cli-$GOOS-$GOARCH.zip"
29+
artifact="coder-cli-$GOOS.zip"
2430
mv coder coder.exe
2531
zip "$artifact" coder.exe
2632
;;

internal/cmd/configssh.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ func binPath() (string, error) {
161161
// if it isn't.
162162
if runtime.GOOS == "windows" {
163163
binName := filepath.Base(exePath)
164+
164165
// We use safeexec instead of os/exec because os/exec returns paths in
165166
// the current working directory, which we will run into very often when
166167
// looking for our own path.

0 commit comments

Comments
 (0)