1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: cleaning up

This commit is contained in:
Carlos Alexandro Becker 2017-12-17 22:11:04 -02:00
parent df5d9c0b43
commit 92b9d92bc8
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 1 additions and 43 deletions

View File

@ -119,8 +119,7 @@ func create(ctx *context.Context, artifacts []artifact.Artifact) error {
func skip(ctx *context.Context, artifacts []artifact.Artifact) error {
for _, a := range artifacts {
log.WithField("binary", a.Name).Info("skip archiving")
// TODO: this should not happen here, maybe add another extra field
// for the extension and/or name without extension?
// TODO: this should not happen here, maybe add another extra field for the extension and/or name without extension?
name, err := nametemplate.Apply(ctx, a, strings.TrimSuffix(a.Name, ".exe"))
if err != nil {
return err

View File

@ -164,47 +164,6 @@ func TestRunPipe(t *testing.T) {
})
}
// TODO: this test is irrelevant and can probavly be removed
func TestRunPipeFormatOverride(t *testing.T) {
folder, err := ioutil.TempDir("", "goreleasertest")
assert.NoError(t, err)
var path = filepath.Join(folder, "bin.zip")
_, err = os.Create(path)
assert.NoError(t, err)
var ctx = context.New(
config.Project{
Dist: folder,
Archive: config.Archive{
Format: "tar.gz",
FormatOverrides: []config.FormatOverride{
{
Format: "zip",
Goos: "darwin",
},
},
},
Brew: config.Homebrew{
GitHub: config.Repo{
Owner: "test",
Name: "test",
},
},
},
)
ctx.Publish = true
ctx.Artifacts.Add(artifact.Artifact{
Name: "bin.zip",
Path: path,
Goos: "darwin",
Goarch: "amd64",
Type: artifact.UploadableArchive,
})
client := &DummyClient{}
assert.NoError(t, doRun(ctx, client))
assert.True(t, client.CreatedFile)
assert.Contains(t, client.Content, "bin.zip")
}
func TestRunPipeNoDarwin64Build(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{