Skip to content

Commit

Permalink
Added support for building release binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel S. Reichenbach committed Dec 26, 2017
1 parent 0e76731 commit eb8a8bb
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ _testmain.go
*.test
*.prof

# release
dist
# bin
vultr
48 changes: 48 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

0 comments on commit eb8a8bb

Please sign in to comment.