Skip to content

Commit

Permalink
Using a custom prepare script
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Dec 9, 2024
1 parent 33b8007 commit 1602863
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions publish/debug-build.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ title: "Debug package builds"

## Is it possible to customize the package build process with custom options/tools/variables?

No, that is not possible (apart from the next section about third-party system requirements).
Think of R-universe more like your own mini-CRAN.
The build environment is actually very similar to that of CRAN, if the package can build on CRAN, it will probably work on R-universe.
Yes, for packages that cannot be build directly from the checkout but need some additional steps, you can add a [script](https://github.com/r-universe-org/build-source/blob/5830b8aa92d5524b3af6d1b617e605d1a2558543/entrypoint.sh#L50-L57) that gets executed before R CMD build at the root of your package:

- either an R script called `bootstrap.R`
- or a shell script called `.prepare`.

Examples of actions performed by the script:

- Initiate a git submodule;
- Run roxygen2 (some authors do not commit the Rd files to git);
- Other prepping.

This is on purpose: we want to make sure that the packages deployed on R-universe are reproducible and will work on the user machine as well, and do not depend on some custom settings or tools.

## How to request additional third party system requirements?

Expand Down

0 comments on commit 1602863

Please sign in to comment.