Skip to content

Commit

Permalink
Update GoReleaser config (#3974)
Browse files Browse the repository at this point in the history
Changes:
- Updates the configuration to remove '--rm-dist' deprecated flag
- Changes extension of SBOM artifacts from .sbom to spdx.json to better
  represent the content of the file (.sbom is an extension that devs at
  GoReleaser came up with and not standard)
- Adds section to override the version that is injected in the binary
  for snapshot builds. These are all the builds that are not an official release.
  • Loading branch information
lucacome authored Jun 16, 2023
1 parent 763ad99 commit f6fa08e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,36 +93,38 @@ builds:
tags:
- aws

archives:
- id: kubernetes-ingress
builds: [kubernetes-ingress]

changelog:
skip: true

checksum:
name_template: 'checksums.txt'
archives:
- id: kubernetes-ingress
builds: [kubernetes-ingress]

sboms:
- artifacts: archive
ids: [kubernetes-ingress]
documents:
- "${artifact}.spdx.json"

release:
ids: [kubernetes-ingress]
extra_files:
- glob: ./dist/**.sbom
- glob: ./dist/**.spdx.json

blobs:
- provider: azblob
bucket: '{{.Env.AZURE_BUCKET_NAME}}'
extra_files:
- glob: ./dist/**.sbom

milestones:
- close: true
- glob: ./dist/**.spdx.json

announce:
slack:
enabled: true
channel: '#announcements'
message_template: 'NGINX Ingress Controller {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}'

milestones:
- close: true

snapshot:
name_template: 'edge'
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ endif
.PHONY: build-goreleaser
build-goreleaser: ## Build Ingress Controller binary using GoReleaser
@goreleaser -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with GoReleaser. Follow the docs to install it https://goreleaser.com/install\n"; exit $$code)
GOOS=linux GOPATH=$(shell go env GOPATH) GOARCH=$(ARCH) goreleaser build --rm-dist --debug --snapshot --id kubernetes-ingress --single-target
GOOS=linux GOPATH=$(shell go env GOPATH) GOARCH=$(ARCH) goreleaser build --clean --debug --snapshot --id kubernetes-ingress --single-target

.PHONY: debian-image
debian-image: build ## Create Docker image for Ingress Controller (Debian)
Expand Down

0 comments on commit f6fa08e

Please sign in to comment.