forked from boyska/circolog
18 lines
524 B
Bash
18 lines
524 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -u
|
||
|
|
||
|
for goosarch in $(go tool dist list | grep -vw -e aix -e js/wasm -e plan9 -e solaris -e android -e nacl)
|
||
|
do
|
||
|
mkdir -p "build/$goosarch"
|
||
|
goos=$(cut -d/ -f 1 <<<$goosarch)
|
||
|
goarch=$(cut -d/ -f 2 <<<$goosarch)
|
||
|
for cmd in cmd/*; do
|
||
|
GOOS=${goos} GOARCH=${goarch} go build -o "build/$goos/$goarch/$(basename $cmd)" ./$cmd
|
||
|
done
|
||
|
done
|
||
|
|
||
|
find build/ -type f|cut -d/ -f 1-3|uniq|while read -r dir; do
|
||
|
zip -j -r "circolog-$(git describe)-$(cut -d/ -f 2-3 <<<"$dir"|tr / -)" "$dir"
|
||
|
done
|