|
|
|
|
@ -204,8 +204,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|
|
|
|
opts.FileSize = r.Size
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fileSizeMB := float64(opts.FileSize / 1000000)
|
|
|
|
|
ui.Message(fmt.Sprintf("Uploading artifact (Size: %.2fMB)", fileSizeMB))
|
|
|
|
|
ui.Message(fmt.Sprintf("Uploading artifact (%d bytes)", opts.FileSize))
|
|
|
|
|
var av *atlas.ArtifactVersion
|
|
|
|
|
doneCh := make(chan struct{})
|
|
|
|
|
errCh := make(chan error, 1)
|
|
|
|
|
@ -221,7 +220,7 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
|
|
|
|
|
|
|
|
|
|
select {
|
|
|
|
|
case err := <-errCh:
|
|
|
|
|
return nil, false, fmt.Errorf("Error uploading (Size: %.2fMB): %s", fileSizeMB, err)
|
|
|
|
|
return nil, false, fmt.Errorf("Error uploading (%d bytes): %s", opts.FileSize, err)
|
|
|
|
|
case <-doneCh:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|