Title: | Manage a CRAN-Style Local Repository |
---|---|
Description: | This will allow easier management of a CRAN-style repository on local networks (i.e. not on CRAN). This might be necessary where hosted packages contain intellectual property owned by a corporation. |
Authors: | Imanuel Costigan <[email protected]> |
Maintainer: | Imanuel Costigan <[email protected]> |
License: | GPL-2 |
Version: | 0.1.5 |
Built: | 2024-12-04 02:54:50 UTC |
Source: | https://github.com/imanuelcostigan/managelocalrepo |
This will create the required terminal directory in the repo.
create_terminal_dir(repo_base, version, type = "win", ...)
create_terminal_dir(repo_base, version, type = "win", ...)
repo_base |
the path of the base of the repository tree. This will have the following child folders: repo_base/bin/ and repo_base/src/. A character vector of length one. |
version |
the version of R that the package should be made available for.
This is not relevant when |
type |
should be |
... |
optional arguments to pass to |
No return value. Will create directory if the directory does not exist. Otherwise it will return an error message.
Setting up a package repository
## Not run: repo_base <- file.path(".") version <- '3.0' create_terminal_dir(repo_base, version) ## End(Not run)
## Not run: repo_base <- file.path(".") version <- '3.0' create_terminal_dir(repo_base, version) ## End(Not run)
This will return the full file path of the terminal directory of a given repo type (and R version number as is appropriate).
full_repo_dir(repo_base, version, type = "win", ...)
full_repo_dir(repo_base, version, type = "win", ...)
repo_base |
the path of the base of the repository tree. This will have the following child folders: repo_base/bin/ and repo_base/src/. A character vector of length one. |
version |
the version of R that the package should be made available for.
This is not relevant when |
type |
should be |
... |
optional arguments to pass to |
Full path to the desired local repo's terminal directory.
Setting up a package repository
## Not run: repo_base <- file.path(".") version <- '3.0' full_repo_dir(repo_base, version) ## End(Not run)
## Not run: repo_base <- file.path(".") version <- '3.0' full_repo_dir(repo_base, version) ## End(Not run)
This package will allow easier maintainence of CRAN-like repos on local networks (i.e. not on CRAN). This might be necessary where hosted packages contain intellectual property owned by a corporation.
This is builds on top of release_package
and makes it
quicker to release packages. The repo base directory can be specified in the
managelocalrepo.base
option. The directory in which the package
file is located is assumed to be a "submissions" folder and can be specified
in the managelocalrepo.submissions
option. These options can be set
using options
, potentially by using .First
quick_release_package(file_name, ...)
quick_release_package(file_name, ...)
file_name |
the package's file name (not full path) |
... |
optional arguments to pass to |
No return value. Will release a package to repo's terminal directory and update the index. Otherwise will return a suitable error message.
## Not run: quick_release_package("test_package.zip") ## End(Not run)
## Not run: quick_release_package("test_package.zip") ## End(Not run)
This will take a package from a given location and populate it to the relevant trees in the local repo. It will create terminal directories if needed.
release_package(package_location, repo_base, type = "win", version = "all", r_versions = c("2.15", "3.0", "3.1", "3.2"), ...)
release_package(package_location, repo_base, type = "win", version = "all", r_versions = c("2.15", "3.0", "3.1", "3.2"), ...)
package_location |
the full path to the package's file. This should be the package's file name represented by a character vector of length one. |
repo_base |
the base directory of the local repository represented by a character vector of length one. |
type |
the type of package file being released. Should be
|
version |
determines which terminal directory to release the package
file to, given a value for |
r_versions |
a character vector of R versions. This is used to determine
the terminal directories when |
... |
optional arguments to pass to |
No return value. Will release a package to the desired local repo's terminal directory and update the relevant index file. Otherwise will return a suitable error message.
Setting up a package repository
## Not run: package_location <- file.path(".", "submissions") package_location <- file.path(package_location, "test_package.zip") repo_base <- file.path(".") release_package(package_location, repo_base) ## End(Not run)
## Not run: package_location <- file.path(".", "submissions") package_location <- file.path(package_location, "test_package.zip") repo_base <- file.path(".") release_package(package_location, repo_base) ## End(Not run)