You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	fix(nix): missing artifact type stringer
This commit is contained in:
		| @@ -25,6 +25,7 @@ import ( | ||||
| // Type defines the type of an artifact. | ||||
| type Type int | ||||
|  | ||||
| // If you add more types, update TestArtifactTypeStringer! | ||||
| const ( | ||||
| 	// UploadableArchive a tar.gz/zip archive to be uploaded. | ||||
| 	UploadableArchive Type = iota + 1 | ||||
| @@ -134,6 +135,8 @@ func (t Type) String() string { | ||||
| 		return "C Shared Library" | ||||
| 	case WingetInstaller, WingetDefaultLocale, WingetVersion: | ||||
| 		return "Winget Manifest" | ||||
| 	case Nixpkg: | ||||
| 		return "Nixpkg" | ||||
| 	default: | ||||
| 		return "unknown" | ||||
| 	} | ||||
|   | ||||
| @@ -926,3 +926,11 @@ func TestArtifactStringer(t *testing.T) { | ||||
| 		Name: "foobar", | ||||
| 	}.String()) | ||||
| } | ||||
|  | ||||
| func TestArtifactTypeStringer(t *testing.T) { | ||||
| 	for i := 1; i <= 29; i++ { | ||||
| 		t.Run(fmt.Sprintf("type-%d-%s", i, Type(i).String()), func(t *testing.T) { | ||||
| 			require.NotEqual(t, "unknown", Type(i).String()) | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user