xmtop/build.sh
2018-03-05 11:54:16 -08:00

28 lines
675 B
Bash
Executable File

#!/usr/bin/env bash
# Build Steps
# 1. update version number in `gotop.go` and `install.sh`
# 2. run this script
# 3. publish binaries on GitHub
# 4. delete `builds` folder
# 5. push changes to GitHub
# more info at https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04
VERSION=$(go run gotop.go -v)
mkdir builds
cd builds
env GOOS=darwin GOARCH=amd64 go build ../
tar czf gotop-$VERSION-darwin_amd64.tgz gotop
rm gotop
env GOOS=linux GOARCH=386 go build ../
tar czf gotop-$VERSION-linux_386.tgz gotop
rm gotop
env GOOS=linux GOARCH=amd64 go build ../
tar czf gotop-$VERSION-linux_amd64.tgz gotop
rm gotop