Skip to content

Commit

Permalink
Fix goreleaser config.
Browse files Browse the repository at this point in the history
The 'replacements' parameter was removed in goreleaser. The name now has to be built directly in the file-name template.

(See: goreleaser/goreleaser#3588 (comment))
  • Loading branch information
gigerdo committed Oct 23, 2023
1 parent 84fca92 commit 374664e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .goreleaser.yml
Expand Up @@ -23,7 +23,7 @@ builds:
- arm64
ignore:
- goos: darwin
goarch: 386
goarch: "386"
ldflags: -s -w -X main.version={{.Env.VERSION }} -X main.commit={{.Commit}} -X main.owner={{.Env.OWNER}} -X main.repo={{.Env.REPO}} -X main.built={{.Env.BUILT}}
binary: ecctl
archives:
Expand All @@ -36,15 +36,16 @@ archives:
snapshot:
name_template: "{{ .Version }}_SNAPSHOT_{{ .ShortCommit }}"
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- file_name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}64-bit
{{- else if eq .Arch "386" }}32-bit
{{- else }}{{ .Arch }}{{ end }}
license: Apache 2.0
maintainer: Elastic Cloud
vendor: Elastic
description: ecctl is the CLI for the Elasticsearch Service and Elastic Cloud Enterprise APIs.
homepage: https://www.elastic.co/guide/en/ecctl/current/index.html
replacements:
amd64: 64-bit
"386": 32-bit
formats:
- deb
- rpm
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile.build
Expand Up @@ -47,7 +47,7 @@ ifneq ($(SKIP_TAG),true)
endif
@ echo "-> Releasing $(BINARY) $(VERSION)..."
@ okta-awscli
@ $(GOBIN)/goreleaser release --skip-validate --rm-dist --release-notes=notes/$(VERSION).md
@ $(GOBIN)/goreleaser release --skip=validate --clean --release-notes=notes/$(VERSION).md

## Generates a changelog file in notes/$(VERSION) for the next release.
changelog:
Expand Down
4 changes: 2 additions & 2 deletions build/Makefile.deps
Expand Up @@ -7,7 +7,7 @@ VERSION_DIR:=$(GOBIN)/versions
VERSION_GOLICENSER:=v0.3.0
VERSION_GOLANGCILINT:=v1.54.2
VERSION_GOBINDATA:=v0.0.0-20190711162640-ee3c2418e368
VERSION_GORELEASER:=v1.2.5
VERSION_GORELEASER:=v1.21.2
VERSION_VERSIONBUMP:=v1.1.0

deps: $(GOBIN)/go-licenser $(GOBIN)/golangci-lint $(GOBIN)/go-bindata
Expand Down Expand Up @@ -48,7 +48,7 @@ $(VERSION_DIR)/.version-goreleaser-$(VERSION_GORELEASER): | $(VERSION_DIR)

$(GOBIN)/goreleaser: $(VERSION_DIR)/.version-goreleaser-$(VERSION_GORELEASER) | $(GOBIN)
@ echo "-> Installing goreleaser..."
@ curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh| sh -s -- -b $(GOBIN) $(VERSION_GORELEASER)
@ go install github.com/goreleaser/goreleaser@$(VERSION_GORELEASER)

$(VERSION_DIR)/.version-versionbump-$(VERSION_VERSIONBUMP): | $(VERSION_DIR)
@ rm -f $(VERSION_DIR)/.version-versionbump-*
Expand Down

0 comments on commit 374664e

Please sign in to comment.