Skip to content

Commit

Permalink
fix errors on new releases
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
  • Loading branch information
paulczar authored and scottrigby committed Feb 7, 2019
1 parent 9e6d542 commit c745146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ func (c *Client) GetRelease(ctx context.Context, tag string) (*github.Repository
return nil, errors.Wrapf(err,
"get release tag: invalid status: %s", res.Status)
}

return nil, ErrReleaseNotFound
return nil, nil
}

return release, nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/upload/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ func Packages(config *Options) error {
fmt.Printf("release %#v", *req.TagName)
release, err := ghc.GetRelease(ctx, *req.TagName)
if err != nil {
if err != ErrReleaseNotFound {
return errors.Wrap(err, "failed to get release")
}
return errors.Wrap(err, "failed to get release")
}
if release == nil {
fmt.Printf("====> Creating release %s\n", *req.TagName)
release, err = ghc.CreateRelease(ctx, req)
if err != nil {
Expand Down

0 comments on commit c745146

Please # to comment.