Skip to content

Commit

Permalink
add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAbides committed Jan 14, 2021
1 parent b55c59d commit 174433b
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tmp/
bin/
.bindown/
dist/
54 changes: 54 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
before:
hooks:
- go mod download
builds:
- id: eventbridge-pipe
binary: eventbridge-pipe
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
main: ./cmd/eventbridge-pipe
- id: eventgrid-pipe
binary: eventgrid-pipe
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
main: ./cmd/eventgrid-pipe
- id: splunk-pipe
binary: splunk-pipe
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
main: ./cmd/splunk-pipe
archives:
- id: splunk-pipe
builds: [splunk-pipe]
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- id: eventbridge-pipe
builds: [eventbridge-pipe]
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- id: eventgrid-pipe
builds: [eventgrid-pipe]
name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
37 changes: 37 additions & 0 deletions bindown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ dependencies:
template: origin#golangci-lint
vars:
version: 1.28.2
goreleaser:
template: origin#goreleaser
vars:
version: 0.154.0
shellcheck:
template: origin#shellcheck
vars:
Expand Down Expand Up @@ -69,6 +73,37 @@ templates:
- linux/mips64le
- linux/s390x
- linux/ppc64le
origin#goreleaser:
url: https://github.com/goreleaser/goreleaser/releases/download/v{{.version}}/goreleaser_{{.os}}_{{.arch}}{{.urlsuffix}}
archive_path: goreleaser{{.archivepathsuffix}}
bin: goreleaser
vars:
archivepathsuffix: ""
urlsuffix: .tar.gz
required_vars:
- version
overrides:
- matcher:
os:
- windows
dependency:
vars:
archivepathsuffix: .exe
urlsuffix: .zip
substitutions:
arch:
"386": i386
amd64: x86_64
os:
darwin: Darwin
linux: Linux
windows: Windows
systems:
- darwin/amd64
- linux/386
- linux/amd64
- windows/386
- windows/amd64
origin#shellcheck:
url: https://github.com/koalaman/shellcheck/releases/download/v{{.version}}/shellcheck-v{{.version}}.{{.os}}.{{.arch}}.tar.xz
archive_path: shellcheck-v{{.version}}/shellcheck
Expand All @@ -94,6 +129,8 @@ template_sources:
url_checksums:
https://github.com/golangci/golangci-lint/releases/download/v1.28.2/golangci-lint-1.28.2-darwin-amd64.tar.gz: 6e6952a4d72906f6265c379743f274b7609a289cc9cbb19bf6ff94e6f8f00daf
https://github.com/golangci/golangci-lint/releases/download/v1.28.2/golangci-lint-1.28.2-linux-amd64.tar.gz: c893b07dd7d2c8e13b6380dd52781bb6732f7f541d90da2dc941be5f7e8be6fb
https://github.com/goreleaser/goreleaser/releases/download/v0.154.0/goreleaser_Darwin_x86_64.tar.gz: b320e02d4c0da96f319e96cecffea719a4d2a22e2734b10117303d8f63da004f
https://github.com/goreleaser/goreleaser/releases/download/v0.154.0/goreleaser_Linux_x86_64.tar.gz: 3f982da1c75bb274c7090c2d0d204cbe2820e07f40725676d46c82b87e200366
https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.darwin.x86_64.tar.xz: b080c3b659f7286e27004aa33759664d91e15ef2498ac709a452445d47e3ac23
https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz: 64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8
https://github.com/myitcv/gobin/releases/download/v0.0.14/darwin-amd64: 08db3d50eea308b475d591d43efc160c7c44f4666da4f2fd103864a9d038b230
Expand Down
8 changes: 8 additions & 0 deletions script/goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -e

CDPATH="" cd -- "$(dirname -- "$(dirname -- "$0")")"

script/bindown install goreleaser 2>/dev/null
exec bin/goreleaser "$@"

0 comments on commit 174433b

Please sign in to comment.