From 491f201b5c2050290752e9b7854bcc02501c5b25 Mon Sep 17 00:00:00 2001 From: wlandau Date: Fri, 7 Feb 2025 11:49:08 -0500 Subject: [PATCH] restrict snapshot binaries to current R release --- DESCRIPTION | 2 +- NEWS.md | 3 ++- R/interpret_status.R | 2 +- R/propose_snapshot.R | 2 +- man/propose_snapshot.Rd | 2 +- multiverse.internals.Rproj | 1 + tests/testthat/test-propose_snapshot.R | 5 ++++- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e443c59..328caab 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: multiverse.internals Title: Internal Infrastructure for R-multiverse Description: R-multiverse requires this internal infrastructure package to automate contribution reviews and populate universes. -Version: 0.3.4.9000 +Version: 0.3.5 License: MIT + file LICENSE URL: https://r-multiverse.org/multiverse.internals/, diff --git a/NEWS.md b/NEWS.md index 7d6199d..5b54a0f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ -# multiverse.internals 0.3.4.9000 +# multiverse.internals 0.3.5 * Depend on R >= 4.4.0 for the base coalescing operator `%||%`. +* Only snapshot binaries for the current R release. # multiverse.internals 0.3.4 diff --git a/R/interpret_status.R b/R/interpret_status.R index b77e5eb..02b6a8f 100644 --- a/R/interpret_status.R +++ b/R/interpret_status.R @@ -31,7 +31,7 @@ interpret_title <- function(issue, package) { "R-multiverse found issues with package ", package ) - if (is.character(issue$version)) { + if (is.character(issue$versions)) { title <- paste(title, "version", issue$version) } if (is.character(issue$remote_hash)) { diff --git a/R/propose_snapshot.R b/R/propose_snapshot.R index 18f0783..94498d7 100644 --- a/R/propose_snapshot.R +++ b/R/propose_snapshot.R @@ -39,7 +39,7 @@ propose_snapshot <- function( path_staging, repo_staging = "https://staging.r-multiverse.org", types = c("src", "win", "mac"), - r_versions = NULL, + r_versions = gsub("\\.[0-9]*$", "", rversions::r_release()$version), mock = NULL ) { path_issues <- file.path(path_staging, "issues.json") diff --git a/man/propose_snapshot.Rd b/man/propose_snapshot.Rd index 4f94d22..e96ee66 100644 --- a/man/propose_snapshot.Rd +++ b/man/propose_snapshot.Rd @@ -8,7 +8,7 @@ propose_snapshot( path_staging, repo_staging = "https://staging.r-multiverse.org", types = c("src", "win", "mac"), - r_versions = NULL, + r_versions = gsub("\\\\.[0-9]*$", "", rversions::r_release()$version), mock = NULL ) } diff --git a/multiverse.internals.Rproj b/multiverse.internals.Rproj index eaa6b81..01c6fea 100644 --- a/multiverse.internals.Rproj +++ b/multiverse.internals.Rproj @@ -1,4 +1,5 @@ Version: 1.0 +ProjectId: f0e71035-91a8-430a-9b3f-1f305789d6d0 RestoreWorkspace: Default SaveWorkspace: Default diff --git a/tests/testthat/test-propose_snapshot.R b/tests/testthat/test-propose_snapshot.R index 0d047f0..68ed54a 100644 --- a/tests/testthat/test-propose_snapshot.R +++ b/tests/testthat/test-propose_snapshot.R @@ -47,7 +47,10 @@ test_that("propose_snapshot()", { readLines(file.path(path_staging, "snapshot.url")), paste0( "https://staging.r-multiverse.org/api/snapshot/zip", - "?types=src,win,mac&packages=good1,good2" + "?types=src,win,mac", + "&binaries=", + gsub("\\.[0-9]*$", "", rversions::r_release()$version), + "&packages=good1,good2" ) ) propose_snapshot(