From 1cc4c1c8299e6c87a4a7eaed8a63011c09667826 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Wed, 17 Jul 2024 09:43:31 -0400 Subject: [PATCH] Updated `sfreleaser doctor` with new error --- CHANGELOG.md | 2 +- cmd/sfreleaser/doctor.go | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c57e05..e14a640 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure `sfreleaser` works with Goreleaser 2.x > [!IMPORTANT] - > You will need to use an up to date version of `goreleaser/goreleaser-cross:v1.22` or later for `sfreleaser` to work properly. + > You will need to use an up to date version of `goreleaser/goreleaser-cross:v1.22` or later for `sfreleaser` to work properly. If you have an error of the form `тип release failed after 0s error=only configurations files on version: 1 are supported, yours is version: 2 , please update your configuration`, update your image to latest version using `docker pull --platform linux/arm64 goreleaser/goreleaser-cross:v1.22` and ensure you `.sfreleaser` does use it properly. - Fixed wrong error when a project was never release. diff --git a/cmd/sfreleaser/doctor.go b/cmd/sfreleaser/doctor.go index dee8e80..4659581 100644 --- a/cmd/sfreleaser/doctor.go +++ b/cmd/sfreleaser/doctor.go @@ -28,6 +28,30 @@ func doctor(cmd *cobra.Command, _ []string) error { fmt.Println(cli.Dedent(` Here a list of known issues and possible solutions: + ## + ### X release failed after 0s error=only configurations files on version: 1 are supported, yours is version: 2 , please update your configuration + ## + + This happens when you are using a newer 'sfreleaser' version (>= v0.8.0) but that the Docker image 'goreleaser/goreleaser-cross' used for the + building is too old. Indeed, newer versions of 'goreleaser-cross' uses Goreleaser version > 2.0 which brings a bunch of breaking changes. + + The 'sfreleaser' tool only works with Goreleaser version >= 2.0.0. First check the project's '.sfreleaser', if there is + + release: + goreleaser-docker-image: + + Ensure the image is based on latest 'goreleaser-cross:1.22' or later. If you were using a custom image, + update it the base to use 'goreleaser/goreleaser-cross:1.22' or later. + + If you are not using a custom image and still have the problem, you might need to re-pull the + image, it assume you have it because we do not specify the patch version, only the major and minor. + This can be done with the following command: + + docker pull --platform=linux/arm64 goreleaser/goreleaser-cross:1.22 + + > **Note** + > Change --platform=linux/arm64 to your platform if you are not on ARM64. + ## ### Unable to copy command PTY to stdout: read /dev/ptmx: input/output error ##