release.sh 709 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -u
  3. for goosarch in $(go tool dist list | grep -vw -e aix -e js/wasm -e plan9 -e solaris -e android -e nacl)
  4. do
  5. mkdir -p "build/$goosarch"
  6. goos=$(cut -d/ -f 1 <<<$goosarch)
  7. goarch=$(cut -d/ -f 2 <<<$goosarch)
  8. for cmd in cmd/*; do
  9. GOOS=${goos} GOARCH=${goarch} go build -o "build/$goos/$goarch/$(basename $cmd)" ./$cmd
  10. done
  11. done
  12. find build/ -type f|cut -d/ -f 1-3|uniq|while read -r dir; do
  13. find $dir/ -type f -executable | xargs sha1sum > $dir/SHA1SUMS.txt
  14. # TODO: touch to last commit date maybe
  15. find build -exec touch -d @1234567890 {} \;
  16. zip -q -X -j -r "circolog-$(git describe --tags --always)-$(cut -d/ -f 2-3 <<<"$dir"|tr / -)" "$dir"
  17. done