Description Usage Arguments Details Asumptions Disclaimer Recommendations Author(s) References See Also Examples
Bumps an R package project to the next Git version number.
1 2 | bumpGitVersion(project = devtools::as.package(".")$package,
temp_credentials = FALSE, .ns = NULL, ...)
|
project |
|
temp_credentials |
|
.ns |
Signature argument. Object containing namespace information. |
... |
Further arguments to be passed to subsequent functions/methods. |
Performs all sorts of Git-related checks and tasks in order to take care that everything necessary is done that is related to bumping a project to a higher version number.
This provided version number is transferred to v{version-number}
,
e.g. v0.1.1
, and added as a Git tag.
All commits linked to the previous version/tag are queried and added
to file CHANGES.md
. Additionally, a template section to state the
changes in the new version is added in file NEWS.md
.
Files DESCRIPTION
and CHANGES.md
are automatically
commited to signal the version bump.
Optionally, you can push the new version (i.e. the new tag) as well
as the associated commit to a remote repository (default: origin
).
This can be any valid Git remote repository, including a GitHub
repository
Essentially, this function is a mere convenience wrapper for the
actual workhorse function bump
and its
method associated to class Bumpr.GitVersion.s3
.
R package project:
You are using this function to systematically manage the versions of an R package project that follows the official conventions (see http://cran.r-project.org/doc/manuals/r-release/R-exts.html
Local Git repository:
Your package project is under Git version control, i.e. a local Git
repository has been created in your package project's root directory.
(look for directory .git
in your package project's root
directory)
Remote Git repository:
At the very least one remote repository with name origin
has been defined for your local Git repository.
Additional remote repositories with different
names are not a problem. You can choose them interactively.
(Run git remote
in your git shell to find out about your
remote repositories).
GitHub repositories are supported
HTTP credentials:
If you want to push to a GitHub repository or any other remote
repository that relies on HTTPS for authentication, the function
assumes that you are willing to store (at least temporarily) your
HTTP credentials in this file:
file.path(Sys.getenv("HOME"), "_netrc")
.
Currently only tested for GitHub repositories as this is the location where the API seems to expect HTTP credentials when pushing to such a repository.
However, You can choose to destroy this file after each bump by setting
temp_credentials = TRUE
.
I will try to find better ways of handling HTTPS credentials in future
releases.
This package is really new. So please test this function with repositories that are not crucial for your productive work!
Initial commit:
Make sure that you already issued an initial commit for your local
repository and pushed this to your remote repository.
The function does have built-in checks for very early stages of a
Git repository (i.e. no commits yet, no .gitignore
file yet,
no branches on the remote repository yet), but I would not consider
this completely stable and tested yet. If you want to check out what
the function does in such early stages, I would recommend testing it
with a toy Git/GitHub repository first
Janko Thyson janko.thyson@gmail.com
http://github.com/jankothyson/bumpr
bumpGitVersion-GitVersion.S3-method
bumpPackageVersion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
##------------------------------------------------------------------------------
## DISCLAIMER
##------------------------------------------------------------------------------
## Please that with repositories that are not crucial for your productive work!
## Make sure that you set your working directory to your package
## project's root directory and that you've read and understood the
## assumptions that this function makes!
bumpGitVersion()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.