build_pkg {pracpac} | R Documentation |
Build a package tar.gz
Description
Builds a package source tar.gz using pkgbuild::build and moves it into a user-specified location (default docker/
).
Usage
build_pkg(pkg_path = ".", img_path = NULL, ...)
Arguments
pkg_path |
Path to the package directory. Default is |
img_path |
Path to the write the docker image definition contents. The default |
... |
Additional optional arguments passed to pkgbuild::build. |
Value
Invisibly returns a list of package info returned by pkg_info, tar.gz source and destination file paths.
Examples
## Not run:
# Specify path to example package source and copy to tempdir()
# Note that in practice you do not need to copy to a tempdir()
# And in fact it may be easiest to use pracpac relative to your package directory root
ex_pkg_src <- system.file("hellow", package = "pracpac", mustWork = TRUE)
file.copy(from = ex_pkg_src, to = tempdir(), recursive = TRUE)
# Build the example package from tempdir()
build_pkg(pkg = file.path(tempdir(), "hellow"))
## End(Not run)
[Package pracpac version 0.2.0 Index]