Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ require (
github.com/docker/cli v29.0.3+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker-credential-helpers v0.9.3 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dustin/go-humanize v1.0.1
github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
Expand Down
11 changes: 8 additions & 3 deletions pkg/cmd/release/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,14 @@ func createRun(opts *CreateOptions) error {
uploadURL = uploadURL[:idx]
}

opts.IO.StartProgressIndicator()
err = shared.ConcurrentUpload(httpClient, uploadURL, opts.Concurrency, opts.Assets)
opts.IO.StopProgressIndicator()
progressPrinter := shared.NewUploadProgressPrinter(opts.IO, opts.Assets)
var callbacks *shared.UploadCallbacks
if progressPrinter != nil {
callbacks = progressPrinter.Callbacks()
defer progressPrinter.Finish()
}

err = shared.ConcurrentUpload(httpClient, uploadURL, opts.Concurrency, opts.Assets, callbacks)
if err != nil {
return cleanupDraftRelease(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/release/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ func Test_createRun(t *testing.T) {
reg.Register(httpmock.REST("DELETE", "releases/123"), httpmock.StatusStringResponse(204, ``))
},
wantStdout: ``,
wantStderr: ``,
wantStderr: "[1/1] Failed uploading ball.tgz: HTTP 422 (https://api.github.com/assets/upload?label=&name=ball.tgz)\n",
wantErr: `HTTP 422 (https://api.github.com/assets/upload?label=&name=ball.tgz)`,
},
{
Expand Down
Loading