1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00

fix: added more logs

This commit is contained in:
Carlos Alexandro Becker 2018-09-18 10:14:30 -03:00
parent 065bab60a4
commit 4206de324e
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -137,10 +137,10 @@ func Upload(ctx *context.Context, puts []config.Put, kind string, check Response
case ModeArchive:
filters = append(filters,
artifact.ByType(artifact.UploadableArchive),
artifact.ByType(artifact.LinuxPackage))
artifact.ByType(artifact.LinuxPackage),
)
case ModeBinary:
filters = append(filters,
artifact.ByType(artifact.UploadableBinary))
filters = append(filters, artifact.ByType(artifact.UploadableBinary))
default:
err := fmt.Errorf("%s: mode \"%s\" not supported", kind, v)
log.WithFields(log.Fields{
@ -158,8 +158,10 @@ func Upload(ctx *context.Context, puts []config.Put, kind string, check Response
}
func uploadWithFilter(ctx *context.Context, put *config.Put, filter artifact.Filter, kind string, check ResponseChecker) error {
var artifacts = ctx.Artifacts.Filter(filter).List()
log.Infof("will upload %d artifacts", len(artifacts))
var g = semerrgroup.New(ctx.Parallelism)
for _, artifact := range ctx.Artifacts.Filter(filter).List() {
for _, artifact := range artifacts {
artifact := artifact
g.Go(func() error {
return uploadAsset(ctx, put, artifact, kind, check)