Skip to content

Commit

Permalink
Merge pull request #257 from rogchap/goreleaser
Browse files Browse the repository at this point in the history
Add configuration for goreleaser
  • Loading branch information
LandonTClipp authored May 10, 2020
2 parents e5cd9a4 + 02a43b9 commit 232ff3e
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
mocks
mockery.prof
mockery.prof
dist
33 changes: 33 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
project_name: mockery
before:
hooks:
- go mod download
builds:
- main: ./cmd/mockery/mockery.go
ldflags:
- -s -w -X github.com/vektra/mockery/mockery.SemVer={{.Version}}
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- amd64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- README.md
- LICENSE
checksum:
name_template: "checksum.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
language: go

# Allow use in forks
go_import_path: github.com/vektra/mockery
os:
- linux
- osx

env:
- GO111MODULE=on CGO_ENABLED=0

go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- tip

before_script:
- go get ./...
# This package is used in tests only, so "go get" misses it
- go get github.com/stretchr/testify/assert
git:
depth: 1

script:
- go test -v -cover ./...

deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
Expand All @@ -25,4 +26,5 @@ golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e h1:ssd5ulOvVWlh4kDSUF2Sqzm
golang.org/x/tools v0.0.0-20200323144430-8dcfad9e016e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
2 changes: 1 addition & 1 deletion mockery/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (s *GeneratorSuite) TestGeneratorPrologueNote() {
generator := s.getGenerator(testFile, "Requester", false)
generator.GeneratePrologueNote("A\\nB")

expected := `// Code generated by mockery v1.0.0. DO NOT EDIT.
expected := `// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
// A
// B
Expand Down
5 changes: 2 additions & 3 deletions mockery/mockery.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package mockery

const (
SemVer = "1.0.0"
)
// SemVer is the version of mockery at build time.
var SemVer = "0.0.0-dev"

0 comments on commit 232ff3e

Please sign in to comment.