Skip to content

Commit

Permalink
Merge main into better-http-errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgavin committed Jun 14, 2022
2 parents c4a0514 + d451bb4 commit 3fd082e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch: {}

jobs:
build:
Expand Down
6 changes: 3 additions & 3 deletions internal/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,15 @@ func (pushService *pushService) createOrUpdateReleaseAsset(release *github.Repos
}
log.Debugf("Uploading release asset %s...", assetPathStat.Name())
assetFile, err := os.Open(pushService.cacheDirectory.AssetPath(release.GetTagName(), assetPathStat.Name()))
if err != nil {
return errors.Wrap(err, "Error opening release asset.")
}
defer assetFile.Close()
progressReader := &ioprogress.Reader{
Reader: assetFile,
Size: assetPathStat.Size(),
DrawFunc: ioprogress.DrawTerminalf(os.Stderr, ioprogress.DrawTextFormatBytes),
}
if err != nil {
return errors.Wrap(err, "Error opening release asset.")
}
_, response, err := pushService.uploadReleaseAsset(release, assetPathStat, progressReader)
if err != nil {
return githubapiutil.EnrichResponseError(response, err, "Error uploading release asset.")
Expand Down

0 comments on commit 3fd082e

Please sign in to comment.