1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-17 01:42:37 +02:00

feat: Added extra files to blob (#1535)

* Reordered indexes in docs

* Fix customization order

* Implemented extra files

* Added tests for extra files

* Added docs

* Fix test with defaults

* Removed path and folder from extra_files

* Fix scope lint

* Removed dead code

* Removed dead code

* Added test for common package

* Fix linting

* Removed false positive from golangci

* Requested changes
This commit is contained in:
Weslei Juan Moser Pereira
2020-05-25 15:07:40 -03:00
committed by GitHub
parent 8109a15292
commit c805451de0
12 changed files with 186 additions and 50 deletions

View File

@ -112,6 +112,19 @@ func TestDefaultsWithProvider(t *testing.T) {
}
func TestPipe_Publish(t *testing.T) {
pipePublish(t, []config.ExtraFile{})
}
func TestPipe_PublishExtraFiles(t *testing.T) {
var extra = []config.ExtraFile{
{
Glob: "./testdata/file.golden",
},
}
pipePublish(t, extra)
}
func pipePublish(t *testing.T, extra []config.ExtraFile) {
gcloudCredentials, _ := filepath.Abs("./testdata/credentials.json")
folder, err := ioutil.TempDir("", "goreleasertest")
@ -127,8 +140,9 @@ func TestPipe_Publish(t *testing.T) {
ProjectName: "testupload",
Blobs: []config.Blob{
{
Bucket: "foo",
Provider: "azblob",
Bucket: "foo",
Provider: "azblob",
ExtraFiles: extra,
},
},
})
@ -151,8 +165,9 @@ func TestPipe_Publish(t *testing.T) {
ProjectName: "testupload",
Blobs: []config.Blob{
{
Bucket: "foo",
Provider: "gs",
Bucket: "foo",
Provider: "gs",
ExtraFiles: extra,
},
},
})
@ -176,8 +191,9 @@ func TestPipe_Publish(t *testing.T) {
ProjectName: "testupload",
Blobs: []config.Blob{
{
Bucket: "foo",
Provider: "s3",
Bucket: "foo",
Provider: "s3",
ExtraFiles: extra,
},
},
})