Skip to content

Commit

Permalink
Now will correctly get deployed tarballs.
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Aug 30, 2018
1 parent 8d1ef9f commit dc930e5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -30,6 +30,7 @@ export(parse_one_remote)
export(parse_remotes)
export(r_version)
export(read_dcf)
export(release_search_ext)
export(remote_binaries)
export(remote_order)
export(remote_package_dcf)
Expand Down
4 changes: 3 additions & 1 deletion R/deployed_tarballs.R
Expand Up @@ -67,7 +67,9 @@ deployed_tarball = function(
stop("Version is not correctly parsed!")
}
# bash workaround
ext = sys_ext()
ext = release_search_ext()
# need for searching thing
ext = gsub(".*", "", ext, fixed = TRUE)

package = sapply(repo, function(x) {
x$repo
Expand Down
2 changes: 1 addition & 1 deletion R/latest_release_with_binary.R
Expand Up @@ -46,7 +46,7 @@ latest_release_with_binary = function(


ddf = df
ddf = ddf[ grep(sys_ext(), ddf$asset_name),]
ddf = ddf[ grep(release_search_ext(), ddf$asset_name),]

if (!(ref %in% c("master", ""))) {
if (!(ref %in% ddf$commit.sha)) {
Expand Down
23 changes: 19 additions & 4 deletions R/sys_ext.R
Expand Up @@ -6,14 +6,29 @@
#'
#' @examples
#' sys_ext()
#' release_search_ext()
sys_ext = function(){
os = Sys.info()
os = os[["sysname"]]
ext = switch(
os,
Windows = ".zip$",
Linux = "_R_x86_64-pc-linux-gnu.*.tar.gz$",
Darwin = ".tgz$"
Windows = ".zip",
Linux = ".tar.gz",
Darwin = ".tgz"
)
return(ext)
}
}

#' @rdname sys_ext
#' @export
release_search_ext = function(){
os = Sys.info()
os = os[["sysname"]]
ext = switch(
os,
Windows = ".zip",
Linux = "_R_x86_64-pc-linux-gnu.*.tar.gz",
Darwin = ".tgz"
)
return(ext)
}
4 changes: 4 additions & 0 deletions man/sys_ext.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dc930e5

Please sign in to comment.