Skip to content

Commit

Permalink
Add github release to update helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
gorcha committed Aug 15, 2022
1 parent f05a6bf commit 22ffc6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions data-raw/update_libphonenumber.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library(xml2)
library(dplyr)
library(xml2, warn.conflicts = FALSE)
library(dplyr, warn.conflicts = FALSE)

update_libphonenumber <- function(jar_name = "libphonenumber", pkg_location = ".") {
message("dialrjars: checking for latest version of '", jar_name, "' jar")
Expand Down Expand Up @@ -79,6 +79,14 @@ update_dialrjars <- function() {
})
}

if (usethis::ui_yeah("Publish new release?")) {
message("dialrjars: creating draft github release")
tryCatch(usethis::use_github_release(),
error = function(e) {
warning("dialrjars: failed to create draft release with error:\n ", e, call. = FALSE)
})
}

invisible(latest)
}

Expand Down

0 comments on commit 22ffc6a

Please sign in to comment.