diff --git a/build/.goreleaser.yml b/build/.goreleaser.yml index f590474..054b20d 100644 --- a/build/.goreleaser.yml +++ b/build/.goreleaser.yml @@ -1,6 +1,7 @@ builds: - binary: gotop goos: + - darwin - linux goarch: - amd64 @@ -11,6 +12,8 @@ builds: - 5 - 6 - 7 + hooks: + post: ./build/build-darwin-cgo.sh archive: name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}" replacements: @@ -18,3 +21,9 @@ archive: format: tgz files: - none* +brew: + github: + owner: cjbassi + name: homebrew-gotop + description: "A terminal based graphical activity monitor inspired by gtop and vtop" + homepage: "https://github.com/cjbassi/gotop" diff --git a/build/build-darwin-cgo.sh b/build/build-darwin-cgo.sh new file mode 100755 index 0000000..0d25779 --- /dev/null +++ b/build/build-darwin-cgo.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +xgo --targets="darwin/386,darwin/amd64" $PWD +mv gotop-darwin-10.6-386 dist/darwin_386/gotop +mv gotop-darwin-10.6-amd64 dist/darwin_amd64/gotop diff --git a/build/build_steps.txt b/build/build_steps.txt index c37f340..71eda3a 100644 --- a/build/build_steps.txt +++ b/build/build_steps.txt @@ -1,5 +1,8 @@ +need to have goreleaser, xgo, and dockerd installed + make sure gotop builds and runs tag commit with version number export GitHub token in shell +make sure dockerd is running run `goreleaser --rm-dist -f build/.goreleaser.yml` update AUR package diff --git a/scripts/download.sh b/scripts/download.sh index 3e48f01..3b1e4e5 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -21,6 +21,8 @@ version=$(get_latest_release_version 'cjbassi/gotop') case "$arch" in # order matters + Darwin\ *64) download darwin_amd64 ;; + Darwin\ *86) download darwin_386 ;; Linux\ armv5*) download linux_arm5 ;; Linux\ armv6*) download linux_arm6 ;; Linux\ armv7*) download linux_arm7 ;;