Skip to content

Commit

Permalink
Linux build: use container if R is not available
Browse files Browse the repository at this point in the history
To build the source package.

[ci skip]
  • Loading branch information
gaborcsardi committed Jan 10, 2025
1 parent 790e59f commit 474ce1c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/build/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ libs-aarch64.done:
touch $@

pak_$(PAKVERSION).tar.gz:
R CMD build ../../..
@if command -v RR >/dev/null; then \
echo "Building R package using `command -v R`."; \
R CMD build ../../..; \
else \
CTR="ghcr.io/r-hub/r-minimal/r-minimal:latest"; \
echo "Building R package using Docker ($${CTR})."; \
docker run -v "`pwd -P`/../../..":"`pwd`/../../.." -w "`pwd`" \
"$${CTR}" R CMD build ../../..; \
fi

# ------------------------------------------------------------------------

Expand Down

0 comments on commit 474ce1c

Please sign in to comment.