Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
fix images
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatjindal committed Oct 5, 2019
1 parent ecf80c5 commit 05cc27a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /go/src/github.com/rajatjindal/krew-plugin-release

COPY . .

RUN GOOS=linux CGO_ENABLED=0 go build -o bin/krew-plugin-release main.go
RUN GOOS=linux CGO_ENABLED=0 go build -ldflags "-w -s" -o bin/krew-plugin-release main.go

FROM scratch

Expand Down
4 changes: 4 additions & 0 deletions pkg/actions/release_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ func GetReleaseInfo(action ActionData) (*github.RepositoryRelease, error) {
return nil, fmt.Errorf("invalid event data")
}

if event.Release == nil {
return nil, fmt.Errorf("event.Release is nil %s", string(payload))
}

if len(event.Release.Assets) == 0 {
return nil, fmt.Errorf("no assets found")
}
Expand Down

0 comments on commit 05cc27a

Please sign in to comment.