update-version {smvr}R Documentation

Update version components

Description

These functions allows to update the components of version objects.

Usage

increment_major(x, ...)

## S3 method for class 'smvr'
increment_major(x, ...)

increment_minor(x, ...)

## S3 method for class 'smvr'
increment_minor(x, ...)

increment_patch(x, ...)

## S3 method for class 'smvr'
increment_patch(x, ...)

mark_as_pre_release(x, ...)

## S3 method for class 'smvr'
mark_as_pre_release(x, ids, ...)

add_build_metadata(x, ...)

## S3 method for class 'smvr'
add_build_metadata(x, metadata = "", ...)

Arguments

x

An version object

...

Additional arguments passed to methods.

ids

Something can be cast to pre_release_ids representing the pre-release identifiers, length must be 1 or the same as x.

metadata

A character vector of build metadata, length must be 1 or the same as x.

Value

An updated version object with the specified changes applied.

Examples

v <- parse_semver(c("0.9.9", "1.0.0-a.1", "1.1.0+1"))

increment_major(v)
increment_minor(v)
increment_patch(v)
mark_as_pre_release(v, ids = "rc.1")
add_build_metadata(v, metadata = "build.1")

[Package smvr version 0.2.0 Index]