Skip to content

Commit

Permalink
Merge pull request #74 from ropensci-review-tools/update-skip
Browse files Browse the repository at this point in the history
only upload update data #54 if actually updated
  • Loading branch information
mpadge authored Nov 7, 2024
2 parents ba386cf + 43e0159 commit 59d15a8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgmatch
Title: Find R Packages Matching Either Descriptions or Other R Packages
Version: 0.4.1.059
Version: 0.4.1.060
Authors@R: c(
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265")),
Expand Down
4 changes: 3 additions & 1 deletion R/data-update-cran.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pkgmatch_update_cran <- function () {
npkgs <- length (new_cran_pkgs)

if (npkgs == 0) {
return (NULL)
return (FALSE)
}

message (
Expand Down Expand Up @@ -60,6 +60,8 @@ pkgmatch_update_cran <- function () {
append_data_to_fn_calls (res, flist, cran = TRUE)

options ("rlib_message_verbosity" = op)

return (TRUE)
}
# nocov end

Expand Down
4 changes: 3 additions & 1 deletion R/data-update-ropensci.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pkgmatch_update_ropensci <- function () {
reg_updated <- reg_today [which (dt <= max_days), ]

if (nrow (reg_updated) == 0L) {
return (TRUE)
return (FALSE)
}

pt0 <- proc.time ()
Expand Down Expand Up @@ -54,6 +54,8 @@ pkgmatch_update_ropensci <- function () {
append_data_to_fn_calls (res, flist, cran = FALSE)

options ("rlib_message_verbosity" = op)

return (TRUE)
}
# nocov end

Expand Down
6 changes: 3 additions & 3 deletions R/data-update.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ pkgmatch_update_data <- function (upload = TRUE) {
results_path <- fs::dir_create (fs::path (fs::path_temp (), "pkgmatch-results"))
flist <- dl_prev_data (results_path)

pkgmatch_update_cran ()
pkgmatch_update_ropensci ()
updated_cran <- pkgmatch_update_cran ()
updated_ros <- pkgmatch_update_ropensci ()

if (upload) {
if (upload && updated_cran && updated_ros) {
for (i in flist) {
piggyback::pb_upload (
file = i,
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/pkgmatch",
"issueTracker": "https://github.com/ropensci-review-tools/pkgmatch/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.4.1.059",
"version": "0.4.1.060",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit 59d15a8

Please sign in to comment.