mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-04 03:11:55 +02:00
fix(nix): missing artifact type stringer
This commit is contained in:
parent
72119e4d83
commit
cc570c3ba4
@ -25,6 +25,7 @@ import (
|
|||||||
// Type defines the type of an artifact.
|
// Type defines the type of an artifact.
|
||||||
type Type int
|
type Type int
|
||||||
|
|
||||||
|
// If you add more types, update TestArtifactTypeStringer!
|
||||||
const (
|
const (
|
||||||
// UploadableArchive a tar.gz/zip archive to be uploaded.
|
// UploadableArchive a tar.gz/zip archive to be uploaded.
|
||||||
UploadableArchive Type = iota + 1
|
UploadableArchive Type = iota + 1
|
||||||
@ -134,6 +135,8 @@ func (t Type) String() string {
|
|||||||
return "C Shared Library"
|
return "C Shared Library"
|
||||||
case WingetInstaller, WingetDefaultLocale, WingetVersion:
|
case WingetInstaller, WingetDefaultLocale, WingetVersion:
|
||||||
return "Winget Manifest"
|
return "Winget Manifest"
|
||||||
|
case Nixpkg:
|
||||||
|
return "Nixpkg"
|
||||||
default:
|
default:
|
||||||
return "unknown"
|
return "unknown"
|
||||||
}
|
}
|
||||||
|
@ -926,3 +926,11 @@ func TestArtifactStringer(t *testing.T) {
|
|||||||
Name: "foobar",
|
Name: "foobar",
|
||||||
}.String())
|
}.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())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user