forked from boyska/circolog
release bash script
This commit is contained in:
parent
f7caefdae1
commit
4b4b330341
3 changed files with 38 additions and 0 deletions
13
makebin.sh
Executable file
13
makebin.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/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
|
8
makezip.sh
Executable file
8
makezip.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
wait
|
||||||
|
|
17
release.sh
Executable file
17
release.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/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
|
Loading…
Reference in a new issue