(create-package-version-tag pkg)
Construct a valid package version tag from a given package
Construct a valid package version tag from a given `package`
(inc-package-versions version-fn packages)
(inc-package-versions version-fn suffix packages)
Increment each packages' semver version in the given packages
map.
This func will call the given version-fn
with each respective package. The
version-fn
is responsible for determining how the version should be
incremented by returning one of [nil, :patch, :minor, :major]
.
Generally this should be called after first associating a :version
to each
package using resolve-package-versions
and a set of commits using
resolve-package-changes
. This information can be used to correctly determine
the next version.
Note that this fn will also inc dependent package versions if those dependent packages weren't themselves incremented. This is to ensure that changes made to a parent package result in dependent packages being incremented and published
Example usage:
(require '[k16.kmono.version.alg.semantic :as semantic])
(->> packages
(resolve-package-versions project-root)
(resolve-package-changes project-root)
(inc-package-versions semantic/version-fn))
This will determine the next version for each package according to semantic-commits.
Increment each packages' semver version in the given `packages` map. This func will call the given `version-fn` with each respective package. The `version-fn` is responsible for determining how the version should be incremented by returning one of `[nil, :patch, :minor, :major]`. Generally this should be called after first associating a `:version` to each package using `resolve-package-versions` and a set of commits using `resolve-package-changes`. This information can be used to correctly determine the next version. Note that this fn will also inc dependent package versions if those dependent packages weren't themselves incremented. This is to ensure that changes made to a parent package result in dependent packages being incremented and published Example usage: ```clojure (require '[k16.kmono.version.alg.semantic :as semantic]) (->> packages (resolve-package-versions project-root) (resolve-package-changes project-root) (inc-package-versions semantic/version-fn)) ``` This will determine the next version for each package according to semantic-commits.
(match-package-version-tag tag pkg-name)
This matches whether a given string is a correctly formatted git version tag
for a package with the given pkg-name
.
Returns the version substring of the tag or nil
if there was no match.
(match-package-version-tag "com.kepler16/kmono-core@1.0.0", 'com.kepler16/kmono-core)
;; => "1.0.0"
This matches whether a given string is a correctly formatted git version tag for a package with the given `pkg-name`. Returns the version substring of the tag or `nil` if there was no match. ```clojure (match-package-version-tag "com.kepler16/kmono-core@1.0.0", 'com.kepler16/kmono-core) ;; => "1.0.0" ```
(package-changed? pkg)
A filter function designed to be used with k16.kmono.core.graph/filter-by
.
Filters a package based on whether it has any file changes since it's last version.
This is determined by whether there are any commits associated with the
package and is generally used in conjunction with
k16.kmono.version/resolve-package-changes
.
A filter function designed to be used with `k16.kmono.core.graph/filter-by`. Filters a package based on whether it has any file changes since it's last version. This is determined by whether there are any commits associated with the package and is generally used in conjunction with `k16.kmono.version/resolve-package-changes`.
(resolve-package-changes project-root packages)
For each package try find all commits that modified files in the package subdirectory since the last known version of the package.
This works by finding commits since a tag constructed from the package name
and version. See k16.kmono.version/resolve-package-versions
for a
description on how this tag is expected to be formatted.
Any commits found will be appended to the packages :commits
key.
For each package try find all commits that modified files in the package subdirectory since the last known version of the package. This works by finding commits since a tag constructed from the package name and version. See `k16.kmono.version/resolve-package-versions` for a description on how this tag is expected to be formatted. Any commits found will be appended to the packages `:commits` key.
(resolve-package-versions project-root packages)
Try resolve the last known version for each of the given packages
.
This works by fiding the latest git tag for each package which follows the
structure of <package-group>/<package-name>@<package-version>
. As an example
a package with the name com.kepler16/kmono-core
might have a tag
com.kepler16/kmono-core@1.0.0
The version component of the tag is matched and used to set the package
:version
key.
This is default implementation for resolving package versions. If your use-case requires alternative strategies then you might be interested in writing your own version of this function.
Other kmono-* API's only care about there being a :version
set on a package
therefore how that field is set is up to you.
Try resolve the last known version for each of the given `packages`. This works by fiding the latest git tag for each package which follows the structure of `<package-group>/<package-name>@<package-version>`. As an example a package with the name `com.kepler16/kmono-core` might have a tag `com.kepler16/kmono-core@1.0.0` The version component of the tag is matched and used to set the package `:version` key. This is default implementation for resolving package versions. If your use-case requires alternative strategies then you might be interested in writing your own version of this function. Other kmono-* API's only care about there being a `:version` set on a package therefore how that field is set is up to you.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close