Skip to content

Commit

Permalink
Switch to goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
barnybug committed Oct 12, 2017
1 parent 757dc3d commit c6c0c20
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ cli53.sublime-project
release/
coverage.txt
coverage/

/dist/
23 changes: 23 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
builds:
- binary: cli53
main: ./cmd/cli53
ldflags: -s -w -X=github.com/barnybug/cli53.version={{.Version}}
goos:
- linux
- darwin
- windows
goarch:
- amd64
- 386
- arm
- arm64
ignore:
- goos: darwin
goarch: 386
hooks:
post: make upx
archive:
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}"
format: binary
replacements:
darwin: mac
21 changes: 2 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
language: go
go:
- 1.7
- 1.9
sudo: false
before_install:
- pip install --user codecov
before_script:
- 'mkdir -p $GOPATH/bin && wget -q https://github.com/barnybug/cli53/releases/download/0.6.0/upx -O $GOPATH/bin/upx && chmod +x $GOPATH/bin/upx'
script:
- make deps test-coverage
before_deploy:
- make release
after_success:
- codecov
deploy:
provider: releases
api_key:
secure: nmqbnVuj7XpuUMs5YmB2X+/Dkq5I2hoWaIUSO5Okse7D8iYW0fWPeqR5xMy3ctSlHJgNarMx3qPJZmr+lJAuwT7xZhvW2kFOJE7Ra/nJgLtuWOMu4zrJ2cLNYTgE4fN3jag5VkgnuB4Ax57QZESssWKLvyBVA7ePaV/HXe1hX7k=
file:
- release/cli53-linux-386
- release/cli53-linux-amd64
- release/cli53-linux-arm
- release/cli53-mac-amd64
- release/cli53-windows-386.exe
- release/cli53-windows-amd64.exe
- release/SHA256SUMS
on:
repo: barnybug/cli53
tags: true
skip_cleanup: true
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
env:
global:
- secure: "M6bUhLlefRqTAfbVfQd2/j4/4CsifJqKQ6Szz2G5RTI0ADrbdNnS0m3SqTdk\nsbp/4cgwaQM+sgnISW2alDaGP+1PmkyXGyftZdLHM1NuGca8/yKVWy/vLW3e\nv++AiYPFLTRxoiZJ9j0bdHjGOffCMvotZhtc9xv0VXVijGdHiIM="
Expand Down
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
export GO15VENDOREXPERIMENT=1

exe = ./cmd/cli53
releaseargs = -ldflags '-w -s'

.PHONY: all build install test coverage deps release
.PHONY: all build install test coverage deps

all: install

Expand All @@ -18,16 +17,9 @@ build:
install:
go install $(exe)

release:
GOOS=linux GOARCH=386 go build $(releaseargs) -o release/cli53-linux-386 $(exe)
GOOS=linux GOARCH=amd64 go build $(releaseargs) -o release/cli53-linux-amd64 $(exe)
GOOS=linux GOARCH=arm go build $(releaseargs) -o release/cli53-linux-arm $(exe)
GOOS=darwin GOARCH=amd64 go build $(releaseargs) -o release/cli53-mac-amd64 $(exe)
GOOS=windows GOARCH=386 go build $(releaseargs) -o release/cli53-windows-386.exe $(exe)
GOOS=windows GOARCH=amd64 go build $(releaseargs) -o release/cli53-windows-amd64.exe $(exe)
goupx release/cli53-linux-amd64
upx release/cli53-linux-386 release/cli53-linux-arm release/cli53-windows-386.exe
cd release; sha256sum cli53-* > SHA256SUMS
upx:
goupx dist/cli53-linux-amd64/cli53-linux-amd64
upx dist/cli53-linux-386/cli53-linux-386 dist/cli53-linux-arm/cli53-linux-arm dist/cli53-windows-386/cli53-windows-386.exe

test-unit:
go test
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var r53 *route53.Route53
var version = "0.8.10"
var version = "master"

// Main entry point for cli53 application
func Main(args []string) int {
Expand Down

0 comments on commit c6c0c20

Please sign in to comment.