Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(release): update goreleaser to 2.2.0 #550

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

alljames
Copy link
Contributor

@alljames alljames commented Aug 23, 2024

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

@CLAassistant
Copy link

CLAassistant commented Aug 23, 2024

CLA assistant check
All committers have signed the CLA.

@alljames
Copy link
Contributor Author

alljames commented Aug 23, 2024

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!

brews:
- name: pluto
goarm: 6
repository:
owner: FairwindsOps
name: homebrew-tap
folder: Formula
directory: Formula
Copy link
Contributor Author

Choose a reason for hiding this comment

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

steps:
- checkout
- setup_remote_docker
- run: goreleaser --snapshot --skip-sign
- run: goreleaser --snapshot --skip=sign
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -1,8 +1,6 @@
module github.com/fairwindsops/pluto/v5

go 1.22.0

toolchain go1.22.4
Copy link
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

@@ -1,8 +1,6 @@
module github.com/fairwindsops/pluto/v5

go 1.22.0

toolchain go1.22.4
Copy link
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
7 checks passed
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