mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-09 13:36:56 +02:00
fix: artifacts.json when type is archive (#2748)
* fix: artifacts.json when type is archive Signed-off-by: Carlos A Becker <caarlos0@gmail.com> * test: fix scoop test Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
This commit is contained in:
parent
395266bb9b
commit
87a1ac21d7
@ -24,7 +24,7 @@ type Type int
|
||||
|
||||
const (
|
||||
// UploadableArchive a tar.gz/zip archive to be uploaded.
|
||||
UploadableArchive Type = iota
|
||||
UploadableArchive Type = iota + 1
|
||||
// UploadableBinary is a binary file to be uploaded.
|
||||
UploadableBinary
|
||||
// UploadableFile is any file that can be uploaded.
|
||||
|
@ -501,6 +501,13 @@ func TestMarshalJSON(t *testing.T) {
|
||||
ExtraID: "adsad",
|
||||
},
|
||||
})
|
||||
artifacts.Add(&Artifact{
|
||||
Name: "foo",
|
||||
Type: UploadableArchive,
|
||||
Extra: map[string]interface{}{
|
||||
ExtraID: "adsad",
|
||||
},
|
||||
})
|
||||
artifacts.Add(&Artifact{
|
||||
Name: "foo",
|
||||
Type: Checksum,
|
||||
|
@ -1 +1 @@
|
||||
[{"name":"foo","type":"Binary","extra":{"ID":"adsad"}},{"name":"foo","type":"Checksum","extra":{"Refresh":"func() error"}}]
|
||||
[{"name":"foo","type":"Binary","extra":{"ID":"adsad"}},{"name":"foo","type":"Archive","extra":{"ID":"adsad"}},{"name":"foo","type":"Checksum","extra":{"Refresh":"func() error"}}]
|
@ -624,6 +624,7 @@ func Test_doRun(t *testing.T) {
|
||||
ctx := tt.args.ctx
|
||||
ctx.Artifacts = artifact.New()
|
||||
for _, a := range tt.artifacts {
|
||||
a.Type = artifact.UploadableArchive
|
||||
ctx.Artifacts.Add(&a)
|
||||
}
|
||||
require.NoError(t, Pipe{}.Default(ctx))
|
||||
|
Loading…
x
Reference in New Issue
Block a user