Skip to content

Commit f046a3a

Browse files
committed
Add build script for releases
1 parent 39f4871 commit f046a3a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Clean
4+
echo "Cleaning up"
5+
rm -rf dist >/dev/null 2>&1
6+
mkdir dist >/dev/null 2>&1
7+
rm buffer-static-upload >/dev/null 2>&1
8+
9+
# Build native
10+
echo "Compiling native binary"
11+
go build main.go
12+
mv main buffer-static-upload
13+
14+
# Build linux
15+
echo "Compiling linux binary"
16+
env GOOS=linux GOARCH=amd64 go build main.go
17+
mv main ./dist/buffer-static-upload-Linux
18+
19+
# Build mac
20+
echo "Compiling mac binary"
21+
env GOOS=darwin GOARCH=amd64 go build main.go
22+
mv main ./dist/buffer-static-upload-Darwin
23+
24+
echo "Done!"

0 commit comments

Comments
 (0)