Skip to content

Commit

Permalink
made it so if you have commit and no release - no dice
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Jun 15, 2017
1 parent 5f67b03 commit 0a74773
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ghtravis
Type: Package
Title: Interfaces with GitHub API and Travis
Version: 0.3.1
Version: 0.3.2
Author: John Muschelli
Maintainer: John Muschelli <muschellij2@gmail.com>
Description: Interfaces and compares things on 'GitHub'
Expand Down
10 changes: 8 additions & 2 deletions R/latest_release_with_binary.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,14 @@ latest_release_with_binary = function(repo,

ddf = df
ddf = ddf[ grep(sys_ext(), ddf$asset_name, fixed = TRUE),]
if (ref %in% ddf$commit.sha) {
ddf = ddf[ ddf$commit.sha %in% ref, ]
if (!(ref %in% "master")) {
if (!(ref %in% ddf$commit.sha)) {
warning(paste0("SHA was given, but no release associated",
" with it!, not installing, returning NA"))
return(NA)
} else {
ddf = ddf[ ddf$commit.sha %in% ref, ]
}
}
ord = order(ddf$asset_created_at, decreasing = TRUE)
ddf = ddf[ord, ]
Expand Down

0 comments on commit 0a74773

Please sign in to comment.