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

Commit 6a05505

Browse files
committed
Add simple release builder from sshcode
1 parent f7d230b commit 6a05505

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

ci/build.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
cd "$(dirname "$0")"
5+
6+
export GOARCH=amd64
7+
tag=$(git describe --tags)
8+
9+
mkdir -p bin
10+
11+
build(){
12+
tmpdir=$(mktemp -d)
13+
go build -ldflags "-X main.version=${tag}" -o "$tmpdir/coder-cli"
14+
15+
pushd "$tmpdir"
16+
tarname="coder-cli-$GOOS-$GOARCH.tar.gz"
17+
tar -czf "$tarname" coder-cli
18+
popd
19+
20+
cp "$tmpdir/$tarname" bin
21+
rm -rf "$tmpdir"
22+
}
23+
24+
GOOS=darwin build
25+
GOOS=linux build

0 commit comments

Comments
 (0)