| Title: | Publish Packages |
|---|---|
| Description: | Publish packages to cran-like repos. |
| Authors: | Devin Pastoor [aut, cre], Xu Fei [ctb], Elizabeth Bouton [ctb] |
| Maintainer: | Devin Pastoor <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.4.0 |
| Built: | 2026-05-31 09:09:13 UTC |
| Source: | https://github.com/a2-ai/pkgpub |
build various versions of a package
build_pkg( .pkgdir = ".", types = c("source", "binary"), repository = NULL, origin = NULL, addl_meta = NULL, supplement_version = FALSE, overwrite = TRUE, remove_remotes = FALSE, ... )build_pkg( .pkgdir = ".", types = c("source", "binary"), repository = NULL, origin = NULL, addl_meta = NULL, supplement_version = FALSE, overwrite = TRUE, remove_remotes = FALSE, ... )
.pkgdir |
path to package |
types |
types of package to build |
repository |
repository name being built for |
origin |
package source |
addl_meta |
additional metadata |
supplement_version |
add additional version info (unix timestamp) to version. TRUE inspects the pkg folder as a git repo, also may provide a character or numeric value to append |
overwrite |
overwrite fields already present when adding fields |
remove_remotes |
delete the remotes field |
... |
parameters to pass to pkgbuild |
supplementing version can be done whenever a build occurs that does not correspond to a formal release/tag. This will automatically add information about the git hash (if available), as well as incrememnt the version number with a unix timestamp that corresponds to the last git hash (if present) or the current system time, if git is not present and no version timestamp is provided.
removing the remotes field can be helpful when dealing with consolidated package installs where all packages are available in a single repository. For example, pulling everything into a posit package manager mirror.
create a cranlike repo that contains the tagged package
create_tagged_repo(.dir, repo_name = "pkgpub", ...)create_tagged_repo(.dir, repo_name = "pkgpub", ...)
.dir |
directory to create the repo in |
repo_name |
repository name to specify in the description |
... |
additional arguments passed to build_pkg |
get the origin url
git_url(remote = "origin")git_url(remote = "origin")
remote |
remote name |
get the tag of the head (current commit)
head_tag()head_tag()
insert packages into a drat repo
insert_packages(pkgs, repository, archive = TRUE, ..., os_flavor = NULL)insert_packages(pkgs, repository, archive = TRUE, ..., os_flavor = NULL)
pkgs |
list of packages to insert |
repository |
repository folder to insert |
archive |
whether to archive the packages after insertion to prevent duplicates |
... |
parameters passed to 'drat::archivePackages' |
os_flavor |
optional os_flavor specification, defaults to NULL unless detected as aarch64 |
repository folder should most likely correspond to the name of the repository set in the pkg metadata, however realistically, the time that they need to match when repos is set in a user session in the ‘getOption(’repos')' field
new cranlike repo will create a cranlike repo
new_cranlike_repo(dir = getwd())new_cranlike_repo(dir = getwd())
dir |
directory to create |
skip remaining drone CI steps if tag is dev tag
skip_remaining_if_dev_tag()skip_remaining_if_dev_tag()
add a git tag based on the pkg version
tag_version(.dir = getwd(), .dirty = FALSE, .fetch = TRUE, .push = TRUE)tag_version(.dir = getwd(), .dirty = FALSE, .fetch = TRUE, .push = TRUE)
.dir |
dir of repo |
.dirty |
whether to tag given the repo is in a dirty state |
.fetch |
run a git fetch first to get tags |
.push |
push created tag |