Description Usage Arguments Details Value See Also Examples
It collects all sources and assemblies found in the project folder and packs them into a single zip file.
1 2 |
prj |
project object to pack. if not passed the loaded project will be packed or the default whichever exists. Will init default project from the working directory if no default project exists. (type: rsuite_project, default: NULL) |
path |
folder path to put output pack into. The folder must exist.
(type: character(1), default: |
pkgs |
names of packages to include in the pack. If NULL will include all project packages (type: character, default: NULL) |
inc_master |
if TRUE will include master scripts in the pack. (type: logical(1), default: TRUE) |
pack_ver |
if passed enforce the version of the pack to the passed value. Expected form of version is DD.DD. (type: character(1), default: NULL) |
rver |
if passed enforce destination R version of the pack. (type: character(1), default: NULL) |
The function is heavily used for building projects for alternative environments (like in docker).
Pack generated is stamped with version. It can be enforced with pack_ver parameter (zip will have suffix <pack_ver>x in the case). If the version is not enforced it is detected out of ZipVersion setting in project PARAMETERS file or from the maximal project packages version number. In that case, the revision number is appended to version: version number will be <ZipVersion>_<rc_ver>. Check for changes in project sources is performed for pack consistency. The resulted pack is marked with the version detected so while building zip after unpacking will have the same version as the original project.
Before building pack project packages will have version altered: revision will be added as the least number to package version.
Logs all messages onto rsuite logger. Use logging::setLevel
to control
logs verbosity.
invisible file path to pack file created. The file name will be in form prjpack_<ProjectName>_<version>.zip
Other in project management: prj_build
,
prj_clean_deps
, prj_init
,
prj_install_deps
, prj_load
,
prj_lock_env
,
prj_start_package
, prj_start
,
prj_unload
, prj_zip
1 2 3 4 5 6 7 8 9 10 11 12 | # create exemplary project base folder
prj_base <- tempfile("example_")
dir.create(prj_base, recursive = TRUE, showWarnings = FALSE)
# start project
prj <- prj_start("my_project", skip_rc = TRUE, path = prj_base)
# create package in the project
prj_start_package("mypackage", prj = prj, skip_rc = TRUE)
# build project source pack
pack_fpath <- prj_pack(prj = prj, path = tempdir(), pack_ver = "1.0")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.