Skip to content

fix(release): update goreleaser to 2.2.0 - #550

Merged
sudermanjr merged 3 commits into
FairwindsOps:masterfrom
alljames:goreleaser2-upgrade
Aug 23, 2024
Merged

fix(release): update goreleaser to 2.2.0#550
sudermanjr merged 3 commits into
FairwindsOps:masterfrom
alljames:goreleaser2-upgrade

Conversation

@alljames

@alljames alljames commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

This PR fixes #549

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

Upgrade the version of Goreleaser following the upgrade guide

What changes did you make?

  • Use most recent release of Go v1.22
  • Modify .goreleaser.yml to use new v2 syntax

What alternative solution should we consider, if any?

Remaining on deprecated version

Signed-off-by: Aled James <aled@komodor.io>
@CLAassistant

CLAassistant commented Aug 23, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@alljames

alljames commented Aug 23, 2024

Copy link
Copy Markdown
Contributor Author

Following Go Releaser v2 Upgrade Guide

Check for deprecations with v1.26.2

git clone --single-branch --branch master https://github.com/FairwindsOps/pluto.git pluto-upstream
cd pluto-upstream

$ docker run --rm -it --volume=$(pwd):/go goreleaser/goreleaser:v1.26.2 check
  • checking                                         path=.goreleaser.yml
  • DEPRECATED:  brews.folder  should not be used anymore, check https://goreleaser.com/deprecations#brewsfolder for more info
  • .goreleaser.yml                                  error=configuration is valid, but uses deprecated properties
  ⨯ command failed                                   error=1 out of 1 configuration file(s) have issues

$ docker run --rm -it --volume=$(pwd):/go --entrypoint=/bin/bash goreleaser/goreleaser:v1.26.2 -
3b4e8de82725:/go# rm -rf ./dist/
3b4e8de82725:/go# grep -iR '\--rm-dist' .
3b4e8de82725:/go# grep -iR '\--skip-' .
./.circleci/config.yml:      - run: goreleaser --snapshot --skip-sign
3b4e8de82725:/go# grep -iR '\--debug' .

Modify .goreleaser.yml using removed in v2 page and validate with v2.2.0

# candidate branch
git clone --single-branch --branch goreleaser2-upgrade https://github.com/alljames/pluto.git pluto-alljames
cd pluto-alljames

$ docker run --rm -it --volume=$(pwd):/go goreleaser/goreleaser:v1.26.2 check
  ⨯ command failed                                   error=only configurations files on  version: 1  are supported, yours is  version: 2 , please update your configuration
$ docker run --rm -it --volume=$(pwd):/go goreleaser/goreleaser:v2.2.0 check
  • checking                                         path=.goreleaser.yml
  • 1 configuration file(s) validated
  • thanks for using goreleaser!

Signed-off-by: Aled James <aled@komodor.io>
Signed-off-by: Aled James <aled@komodor.io>
Comment thread .goreleaser.yml
owner: FairwindsOps
name: homebrew-tap
folder: Formula
directory: Formula

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .circleci/config.yml
- checkout
- setup_remote_docker
- run: goreleaser --snapshot --skip-sign
- run: goreleaser --snapshot --skip=sign

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread go.mod

go 1.22.0

toolchain go1.22.4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toolchain removed by go get -u

Comment thread go.mod

go 1.22.0

toolchain go1.22.4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toolchain removed by go get -u

@sudermanjr
sudermanjr merged commit 2fc7c1b into FairwindsOps:master Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Goreleaser on (deprecated) version v1.26.2: should be upgraded to (supported) v2.2.0

3 participants