mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-31 01:53:50 +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 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())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user