1
0
mirror of https://github.com/cjbassi/gotop.git synced 2025-05-03 22:17:15 +08:00
gotop/build.sh

26 lines
543 B
Bash
Raw Normal View History

2018-02-21 13:08:22 -08:00
#!/usr/bin/env bash
2018-03-04 18:30:02 -08:00
# Build Steps
# 1. update version number in `gotop.go` and `install.sh`
2018-03-04 18:30:02 -08:00
# 2. run this script
# 3. publish binaries on GitHub
# 4. delete `builds` folder
# 5. push changes to GitHub
2018-03-04 18:30:02 -08:00
2018-02-21 13:08:22 -08:00
VERSION=$(go run gotop.go -v)
2018-03-04 18:30:02 -08:00
mkdir builds
cd builds
env GOOS=darwin GOARCH=amd64 go build ../
2018-02-21 13:08:22 -08:00
tar czf gotop-$VERSION-darwin_amd64.tgz gotop
rm gotop
2018-03-04 18:30:02 -08:00
env GOOS=linux GOARCH=386 go build ../
2018-02-21 13:08:22 -08:00
tar czf gotop-$VERSION-linux_386.tgz gotop
rm gotop
2018-03-04 18:30:02 -08:00
env GOOS=linux GOARCH=amd64 go build ../
2018-02-21 13:08:22 -08:00
tar czf gotop-$VERSION-linux_amd64.tgz gotop
rm gotop