Skip to content

Commit 4acfd45

Browse files
committed
Update goreleaser to v2
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
1 parent 4ecdffb commit 4acfd45

2 files changed

Lines changed: 9 additions & 17 deletions

File tree

.goreleaser.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod download
4-
# you may remove this if you don't need go generate
55
- go generate ./...
66
project_name: cortextool
77
builds:
@@ -76,32 +76,26 @@ builds:
7676
- amd64
7777
- 386
7878
archives:
79-
- replacements:
80-
darwin: mac-os
81-
linux: linux
82-
windows: windows
83-
386: i386
84-
amd64: x86_64
79+
- name_template: >-
80+
{{ .Binary }}_{{ .Version }}_{{ if eq .Os "darwin" }}mac-os{{ else }}{{ .Os }}{{ end }}_{{ if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "386" }}i386{{ else }}{{ .Arch }}{{ end }}
8581
format_overrides:
8682
- goos: windows
87-
format: zip
83+
formats: [zip]
8884
files:
8985
- none*
90-
format: binary
86+
formats: [binary]
9187
checksum:
9288
name_template: 'checksums.txt'
9389
snapshot:
94-
name_template: "{{ .Tag }}-next"
90+
version_template: "{{ .Tag }}-next"
9591
changelog:
9692
sort: asc
9793
filters:
9894
exclude:
9995
- '^docs:'
10096
- '^test:'
10197
dockers:
102-
- goos: linux
103-
goarch: amd64
104-
ids:
98+
- ids:
10599
- cortextool-linux
106100
dockerfile: cmd/cortextool/GR.Dockerfile
107101
image_templates:
@@ -114,9 +108,7 @@ dockers:
114108
- "--label=org.opencontainers.image.version={{.Version}}"
115109
- "--label=repository=https://github.com/cortexproject/cortex-tools"
116110
- "--label=homepage=https://cortexmetrics.io"
117-
- goos: linux
118-
goarch: amd64
119-
ids:
111+
- ids:
120112
- benchtool-linux
121113
dockerfile: cmd/benchtool/GR.Dockerfile
122114
image_templates:

RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $ git tag -s "${tag}" -m "${tag}"
1111
$ git push origin "${tag}"
1212
```
1313

14-
3. Run `$ goreleaser release --release-notes=changelogs/v0.3.0.md --rm-dist` where the changelog file is the one created as part of step 1.
14+
3. Run `$ goreleaser release --release-notes=changelogs/v0.3.0.md --clean` where the changelog file is the one created as part of step 1.
1515
4. The docker image will be pushed automatically.
1616

1717

0 commit comments

Comments
 (0)