issue-27: cross-compile darwin w/ cgo

This commit is contained in:
Michael R Fleet 2018-04-29 12:05:29 -04:00
parent 21747ecd06
commit 035126b2fb
2 changed files with 14 additions and 0 deletions

View File

@ -12,6 +12,7 @@
builds:
- binary: gotop
goos:
- darwin
- linux
goarch:
- amd64
@ -22,8 +23,16 @@ builds:
- 5
- 6
- 7
hooks:
post: ./build-darwin-cgo.sh
archive:
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"
replacements:
arm64: arm8
format: tgz
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"

5
build-darwin-cgo.sh Executable file
View File

@ -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