Skip to content

Commit defa8aa

Browse files
committed
Inline some details on semantic versioning
Closes #1638
1 parent 9eba243 commit defa8aa

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

R/version.R

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
#' Increment package version
22
#'
3-
#' @description `use_version()` increments the "Version" field in `DESCRIPTION`,
4-
#' adds a new heading to `NEWS.md` (if it exists), and commits those changes
5-
#' (if package uses Git). It makes the same update to a line like `PKG_version
6-
#' = "x.y.z";` in `src/version.c` (if it exists).
3+
#' @description
74
#'
8-
#' @description `use_dev_version()` increments to a development version, e.g.
9-
#' from 1.0.0 to 1.0.0.9000. If the existing version is already a development
10-
#' version with four components, it does nothing. Thin wrapper around
11-
#' `use_version()`.
5+
6+
#' usethis supports semantic versioning, which is described in more detail in
7+
#' the [version
8+
#' section](https://r-pkgs.org/description.html#description-version) of [R
9+
#' Packages](https://r-pkgs.org). A version number breaks down like so:
10+
#'
11+
#' <major>.<minor>.<patch> (released version)
12+
#' <major>.<minor>.<patch>.<dev> (dev version)
13+
#'
14+
15+
#' `use_version()` increments the "Version" field in `DESCRIPTION`, adds a new
16+
#' heading to `NEWS.md` (if it exists), and commits those changes (if package
17+
#' uses Git). It makes the same update to a line like `PKG_version = "x.y.z";`
18+
#' in `src/version.c` (if it exists).
1219
#'
20+
21+
#' `use_dev_version()` increments to a development version, e.g. from 1.0.0 to
22+
#' 1.0.0.9000. If the existing version is already a development version with
23+
#' four components, it does nothing. Thin wrapper around `use_version()`.
24+
#'
25+
1326
#' @param which A string specifying which level to increment, one of: "major",
1427
#' "minor", "patch", "dev". If `NULL`, user can choose interactively.
28+
1529
#'
1630
#' @seealso The [version
17-
#' section](https://r-pkgs.org/description.html#version) of [R
31+
#' section](https://r-pkgs.org/description.html#description-version) of [R
1832
#' Packages](https://r-pkgs.org).
1933
#'
2034
#' @examples

man/use_version.Rd

Lines changed: 15 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)