(append version value)
Appends the value to the version in the pipe.
Appends the value to the version in the pipe.
(bump-semver version indicator)
Bumps the specific indicator of an incoming semver. Options for
indicator are :major
, :minor
, and :patch
.
Bumps do ripple through lower order indicators (i.e. 0.1.5
with a
:minor
bump would lead to 0.2.0
)
Bumps the specific indicator of an incoming semver. Options for indicator are `:major`, `:minor`, and `:patch`. Bumps do ripple through lower order indicators (i.e. `0.1.5` with a `:minor` bump would lead to `0.2.0`)
(env var-name)
Returns the value of the environment variable.
Returns the value of the environment variable.
(extract-base-semver version)
Parses the incoming version as a pure semver (just a simple string
of <major>.<minor>.<patch>
).
Parses the incoming version as a pure semver (just a simple string of `<major>.<minor>.<patch>`).
(instant)
Returns a timestamp as a string.
Returns a timestamp as a string.
(prepend version value)
Prepends the value to the version in the pipe.
Prepends the value to the version in the pipe.
(read-file path)
(read-file path regex)
Reads a version (or any other information) from a file. If a path is provided, the first line of the file should contain the information you are want to read.
If a path and a regex is provided, the whole file is read and the first group match of the regex is returned. If no match is found, an exception is thrown.
Reads a version (or any other information) from a file. If a path is provided, the first line of the file should contain the information you are want to read. If a path and a regex is provided, the whole file is read and the first group match of the regex is returned. If no match is found, an exception is thrown.
(save-file version path)
(save-file version path template-path)
(save-file version path template-path var-name)
Saves the incoming version from the pipeline to the file specified by the path.
A template file can be specified as the third parameter. In such
case, the string ${VERSION}
will be replaced with the incoming
version.
It is also possible to specify a placeholder name in case your
template has a different format (i.e. you could specify "SEMVER"
to have all the ${SEMVER}
replaced.
Saves the incoming version from the pipeline to the file specified by the path. A template file can be specified as the third parameter. In such case, the string `${VERSION}` will be replaced with the incoming version. It is also possible to specify a placeholder name in case your template has a different format (i.e. you could specify "SEMVER" to have all the `${SEMVER}` replaced.
(set-semver version {:keys [major minor patch ripple?] :as opts})
Allows direct manipulation of an incoming semver version.
The second parameter is a map with the keys:
major
: major number to set the semverminor
: minor number to set the semverpatch
: patch number to set the semverripple?
: (default false) if true, then any change on higher order
indicator ripple through the lower order ones (i.e. change a major
up would set minor
and patch
to 0
each)If a certain key is not passed, then that indicator is untouched.
If the incoming version is not parsed as a semver,
extract-base-semver
will be called on it.
Allows direct manipulation of an incoming semver version. The second parameter is a map with the keys: * `major`: major number to set the semver * `minor`: minor number to set the semver * `patch`: patch number to set the semver * `ripple?`: (default false) if true, then any change on higher order indicator ripple through the lower order ones (i.e. change a `major` up would set `minor` and `patch` to `0` each) If a certain key is not passed, then that indicator is untouched. If the incoming version is not parsed as a semver, `extract-base-semver` will be called on it.
(stage version)
Stages the incoming version so that it can be used later.
Stages the incoming version so that it can be used later.
(unstage)
Unstages a version that had been previously stage by the stage
function.
Unstages a version that had been previously stage by the `stage` function.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close