Skip to content

Commit 34d3e90

Browse files
committed
Run BiocCheck
1 parent d098400 commit 34d3e90

File tree

4 files changed

+23
-1
lines changed

4 files changed

+23
-1
lines changed

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ License: MIT + file LICENSE
99
Encoding: UTF-8
1010
LazyData: true
1111
Imports:
12+
BiocCheck,
1213
cffr,
1314
commonmark,
1415
curl,
@@ -28,5 +29,6 @@ Imports:
2829
unix,
2930
yaml,
3031
xml2
31-
RoxygenNote: 7.3.2.9000
32+
RoxygenNote: 7.3.3
3233
Additional_repositories: https://rcppcore.r-universe.dev
34+
Remotes: Bioconductor/BiocCheck

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export(annotated_error)
44
export(backfill_bioc_downloads)
55
export(backfill_indexurls)
66
export(backfill_search_results)
7+
export(bioc_check)
78
export(commit_info_base64)
89
export(find_logo)
910
export(find_readme_url)

R/bioccheck.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#' @export
2+
bioc_check <- function(sourcepkg, install = FALSE){
3+
options(BiocManager.check_repositories = FALSE)
4+
if(Sys.getenv("UNIVERSE_NAME") == 'bioc-release'){
5+
Sys.setenv(R_BIOC_VERSION = as.character(BiocManager:::.version_bioc("release")))
6+
} else {
7+
Sys.setenv(R_BIOC_VERSION = as.character(BiocManager:::.version_bioc("devel")))
8+
}
9+
10+
library(BiocCheck)
11+
BiocCheck(sourcepkg, install = install, 'no-check-R-ver' = TRUE)
12+
}

entrypoint.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,13 @@ Rscript -e "buildtools::render_html_manual('$PACKAGE', 'outputs/$PACKAGE/extra')
273273
Rscript -e "buildtools::generate_metadata_files('$PACKAGE', '$REPO', '$SUBDIR', 'outputs/$PACKAGE', '$PKGDIR', '$URL', '$BRANCH')"
274274
echo "::endgroup::"
275275

276+
# Run BiocCheck for Bioconductor repos only
277+
if [ "${UNIVERSE_NAME:0:4}" == "bioc" ]; then
278+
echo "::group::BiocCheck('$SOURCEPKG')"
279+
Rscript -e "buildtools::bioc_check('$SOURCEPKG', 'install.log')"
280+
echo "::endgroup::"
281+
fi
282+
276283
# if outputs has any files, add them to tarball
277284
echo "::group::Adding extra files to tarball"
278285
gunzip "$SOURCEPKG"

0 commit comments

Comments
 (0)