mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
refactor: remove unnecessary code
Since e0897fc2d2
this is not needed
anymore.
This commit is contained in:
parent
8ae5d1563b
commit
5a2f6d0318
@ -50,10 +50,8 @@ func TestRunFullPipe(t *testing.T) {
|
|||||||
var pre = filepath.Join(folder, "pre")
|
var pre = filepath.Join(folder, "pre")
|
||||||
var post = filepath.Join(folder, "post")
|
var post = filepath.Join(folder, "post")
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Binary: "testing",
|
Binary: "testing",
|
||||||
Flags: "-v",
|
Flags: "-v",
|
||||||
Ldflags: "-X main.test=testing",
|
Ldflags: "-X main.test=testing",
|
||||||
@ -86,7 +84,6 @@ func TestRunPipeFormatBinary(t *testing.T) {
|
|||||||
Dist: folder,
|
Dist: folder,
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Binary: "testing",
|
Binary: "testing",
|
||||||
Goos: []string{
|
Goos: []string{
|
||||||
runtime.GOOS,
|
runtime.GOOS,
|
||||||
@ -111,10 +108,8 @@ func TestRunPipeArmBuilds(t *testing.T) {
|
|||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
var binary = filepath.Join(folder, "armtesting")
|
var binary = filepath.Join(folder, "armtesting")
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Binary: "armtesting",
|
Binary: "armtesting",
|
||||||
Flags: "-v",
|
Flags: "-v",
|
||||||
Ldflags: "-X main.test=armtesting",
|
Ldflags: "-X main.test=armtesting",
|
||||||
@ -140,10 +135,8 @@ func TestBuildFailed(t *testing.T) {
|
|||||||
defer back()
|
defer back()
|
||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Flags: "-flag-that-dont-exists-to-force-failure",
|
Flags: "-flag-that-dont-exists-to-force-failure",
|
||||||
Goos: []string{
|
Goos: []string{
|
||||||
runtime.GOOS,
|
runtime.GOOS,
|
||||||
@ -162,10 +155,8 @@ func TestRunPipeWithInvalidOS(t *testing.T) {
|
|||||||
defer back()
|
defer back()
|
||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Flags: "-v",
|
Flags: "-v",
|
||||||
Goos: []string{
|
Goos: []string{
|
||||||
"windows",
|
"windows",
|
||||||
@ -185,11 +176,9 @@ func TestRunInvalidNametemplate(t *testing.T) {
|
|||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
for _, format := range []string{"tar.gz", "zip", "binary"} {
|
for _, format := range []string{"tar.gz", "zip", "binary"} {
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
ProjectName: "nameeeee",
|
ProjectName: "nameeeee",
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Binary: "namet{{.est}",
|
Binary: "namet{{.est}",
|
||||||
Flags: "-v",
|
Flags: "-v",
|
||||||
Goos: []string{
|
Goos: []string{
|
||||||
@ -214,10 +203,8 @@ func TestRunInvalidLdflags(t *testing.T) {
|
|||||||
defer back()
|
defer back()
|
||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Main: ".",
|
|
||||||
Binary: "nametest",
|
Binary: "nametest",
|
||||||
Flags: "-v",
|
Flags: "-v",
|
||||||
Ldflags: "-s -w -X main.version={{.Version}",
|
Ldflags: "-s -w -X main.version={{.Version}",
|
||||||
@ -238,7 +225,6 @@ func TestRunPipeFailingHooks(t *testing.T) {
|
|||||||
defer back()
|
defer back()
|
||||||
writeGoodMain(t, folder)
|
writeGoodMain(t, folder)
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Binary: "hooks",
|
Binary: "hooks",
|
||||||
@ -271,7 +257,6 @@ func TestRunPipeWithouMainFunc(t *testing.T) {
|
|||||||
defer back()
|
defer back()
|
||||||
writeMainWithoutMainFunc(t, folder)
|
writeMainWithoutMainFunc(t, folder)
|
||||||
var config = config.Project{
|
var config = config.Project{
|
||||||
Dist: folder,
|
|
||||||
Builds: []config.Build{
|
Builds: []config.Build{
|
||||||
{
|
{
|
||||||
Binary: "no-main",
|
Binary: "no-main",
|
||||||
|
Loading…
Reference in New Issue
Block a user