Skip to content

Commit bd49254

Browse files
committed
Add cross-compiling script
1 parent a0075b2 commit bd49254

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crosscompile.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
for target in darwin:amd64 linux:amd64 linux:386 linux:arm windows:amd64; do
4+
echo "Compiling $target"
5+
export GOOS=$(echo $target | cut -d: -f1) GOARCH=$(echo $target | cut -d: -f2)
6+
bash -c "go build -o $(basename $(echo $PWD))_${GOOS}_${GOARCH} ."
7+
done

0 commit comments

Comments
 (0)