1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-31 01:53:50 +02:00

fix: archive subdir with the same name as src

closes  #2366

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2021-07-26 08:38:14 -03:00
parent 1dd2ad1ae6
commit a9f076b8fc
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 3 additions and 12 deletions

View File

@ -286,10 +286,7 @@ type fileAlias File
func (f *File) UnmarshalYAML(unmarshal func(interface{}) error) error {
var str string
if err := unmarshal(&str); err == nil {
*f = File{
Source: str,
Destination: str,
}
*f = File{Source: str}
return nil
}

View File

@ -18,10 +18,7 @@ files:
`), &actual)
require.NoError(t, err)
require.Equal(t, []File{
{
Source: "./script.sh",
Destination: "./script.sh",
},
{Source: "./script.sh"},
}, actual.Files)
}
@ -39,10 +36,7 @@ files:
`), &actual)
require.NoError(t, err)
require.Equal(t, []File{
{
Source: "./script.sh",
Destination: "./script.sh",
},
{Source: "./script.sh"},
{
Source: "./foo",
Destination: "./bar",