diff --git a/.gitignore b/.gitignore index c7a4d89..6d4ffd9 100644 --- a/.gitignore +++ b/.gitignore @@ -23,5 +23,7 @@ _testmain.go *.test *.prof +# release +dist # bin vultr diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..228d323 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,48 @@ +# See https://goreleaser.com/ for details +# Build customization +build: + main: vultr.go + binary: vultr + env: + - CGO_ENABLED=0 + goos: + - darwin + - linux + - windows + - freebsd + - netbsd + - openbsd + - dragonfly + goarch: + - amd64 + - 386 + - arm + - arm64 + ignore: + - goos: openbsd + goarch: arm + goarm: 6 + +archive: + format: tar.gz + format_overrides: + - goos: windows + format: zip + name_template: "{{.Binary}}_{{.Version}}_{{.Os}}-{{.Arch}}" + replacements: + amd64: 64bit + 386: 32bit + arm: ARM + arm64: ARM64 + darwin: macOS + linux: Linux + windows: Windows + openbsd: OpenBSD + netbsd: NetBSD + freebsd: FreeBSD + dragonfly: DragonFlyBSD + files: + - README.md + - LICENSE +release: + draft: true \ No newline at end of file diff --git a/Makefile b/Makefile index 7e87e11..0ee8327 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ all: prepare lint vet test build prepare: go get -v github.com/golang/lint/golint go get -v github.com/Masterminds/glide + go get -v github.com/goreleaser/goreleaser glide install build: @@ -34,6 +35,6 @@ test: check: lint vet test release: - goxc -os="linux darwin windows freebsd openbsd" -tasks-=validate + goreleaser .PHONY: all prepare build lint vet test check release