summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-04-09 18:07:36 -0700
committerCaleb Bassi <calebjbassi@gmail.com>2018-04-09 18:43:34 -0700
commitb36602ca97357a075a13368e123ab7b9b4979418 (patch)
treea7fcd76795fad78cd2469121ad9f7acfc3739fe5
parent39f7d34c509fd321cbc3d4c30a034cfa75ea92e9 (diff)
Add goreleaser1.2.4
-rw-r--r--.gitignore2
-rw-r--r--.goreleaser.yml20
-rwxr-xr-xbuild.sh27
-rwxr-xr-xdownload.sh7
4 files changed, 25 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
index 00c3410..5e18e0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
gotop
-build/
+dist/
diff --git a/.goreleaser.yml b/.goreleaser.yml
new file mode 100644
index 0000000..5984d05
--- /dev/null
+++ b/.goreleaser.yml
@@ -0,0 +1,20 @@
+# Build Steps
+# 1. update version number in `main.go` and `download.sh`
+# 2. commit changes
+# 3.
+# 4. push changes to GitHub
+# 5. update AUR package
+
+builds:
+ - binary: gotop
+ goos:
+ - darwin
+ - linux
+ goarch:
+ - amd64
+ - 386
+ ignore:
+ - goos: darwin
+ goarch: 386
+archive:
+ format: tgz
diff --git a/build.sh b/build.sh
deleted file mode 100755
index abf0eb5..0000000
--- a/build.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-# Build Steps
-# 1. update version number in `main.go` and `download.sh`
-# 2. run this script
-# 3. publish binaries on GitHub
-# 4. push changes to GitHub
-# 5. update AUR package
-
-# more info at https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04
-
-VERSION=$(go run main.go -v)
-
-mkdir -p build
-cd build
-
-env GOOS=darwin GOARCH=amd64 go build -o gotop ../
-tar czf gotop-$VERSION-darwin_amd64.tgz gotop
-rm gotop
-
-env GOOS=linux GOARCH=386 go build -o gotop ../
-tar czf gotop-$VERSION-linux_386.tgz gotop
-rm gotop
-
-env GOOS=linux GOARCH=amd64 go build -o gotop ../
-tar czf gotop-$VERSION-linux_amd64.tgz gotop
-rm gotop
diff --git a/download.sh b/download.sh
index 7296f27..ddecfd1 100755
--- a/download.sh
+++ b/download.sh
@@ -3,9 +3,10 @@
VERSION=1.2.3
download() {
- curl -L https://github.com/cjbassi/gotop/releases/download/$VERSION/gotop-$VERSION-${1}.tgz > gotop.tgz
- tar xf gotop.tgz
- rm gotop.tgz
+ archive=gotop-$VERSION-${1}.tgz
+ curl -LO https://github.com/cjbassi/gotop/releases/download/$VERSION/$archive
+ tar xf $archive
+ rm $archive
}
arch=$(uname -sm)