mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
ec2db4a727
<!-- Hi, thanks for contributing! Please make sure you read our CONTRIBUTING guide. Also, add tests and the respective documentation changes as well. --> <!-- If applied, this commit will... --> ... <!-- Why is this change being made? --> ... <!-- # Provide links to any relevant tickets, URLs or other resources --> ... --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
46 lines
1.8 KiB
Go
46 lines
1.8 KiB
Go
package chocolatey
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/goreleaser/goreleaser/v2/internal/golden"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestNuspecBytes(t *testing.T) {
|
|
m := &Nuspec{
|
|
Xmlns: schema,
|
|
Metadata: Metadata{
|
|
ID: "goreleaser",
|
|
Version: "1.12.3",
|
|
PackageSourceURL: "https://github.com/goreleaser/goreleaser",
|
|
Owners: "caarlos0",
|
|
Title: "GoReleaser",
|
|
Authors: "caarlos0",
|
|
ProjectURL: "https://goreleaser.com/",
|
|
IconURL: "https://raw.githubusercontent.com/goreleaser/goreleaser/main/www/docs/static/avatar.png",
|
|
Copyright: "2016-2022 Carlos Alexandro Becker",
|
|
LicenseURL: "https://github.com/goreleaser/goreleaser/blob/main/LICENSE.md",
|
|
RequireLicenseAcceptance: true,
|
|
ProjectSourceURL: "https://github.com/goreleaser/goreleaser",
|
|
DocsURL: "https://github.com/goreleaser/goreleaser/blob/main/README.md",
|
|
BugTrackerURL: "https://github.com/goreleaser/goreleaser/issues",
|
|
Tags: "go docker homebrew golang package",
|
|
Summary: "Deliver Go binaries as fast and easily as possible",
|
|
Description: "GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.",
|
|
ReleaseNotes: "This tag is only to keep version parity with the pro version, which does have a couple of bugfixes.",
|
|
Dependencies: &Dependencies{Dependency: []Dependency{
|
|
{ID: "nfpm", Version: "2.20.0"},
|
|
}},
|
|
},
|
|
Files: Files{File: []File{
|
|
{Source: "tools\\**", Target: "tools"},
|
|
}},
|
|
}
|
|
|
|
out, err := m.Bytes()
|
|
require.NoError(t, err)
|
|
|
|
golden.RequireEqualExt(t, out, ".nuspec")
|
|
}
|