Facade grouping the default apis in one place.
Facade grouping the default apis in one place.
(build-jar! param)
Build a skinny jar for the project.
Depending on the value of :fr...mbt.alpha.build.jar/allow-non-maven-deps
this function will throw
an exception if non maven deps are found.
Also ensures several config keys are present using
fr.jeremyschoffen.mbt.alpha.default.jar/ensure-jar-defaults
.
Build a skinny jar for the project. Depending on the value of `:fr...mbt.alpha.build.jar/allow-non-maven-deps` this function will throw an exception if non maven deps are found. Also ensures several config keys are present using [[fr.jeremyschoffen.mbt.alpha.default.jar/ensure-jar-defaults]].
(build-uberjar! param)
Build an uberjar for the project. Ensure several config keys using [[fr.jeremyschoffen.mbt.alpha.default.building/ensure-jar-defaults]].
Build an uberjar for the project. Ensure several config keys using [[fr.jeremyschoffen.mbt.alpha.default.building/ensure-jar-defaults]].
Representation of clojars following the :maven/server
spec.
Representation of clojars following the `:maven/server` spec.
(config)
(config user-defined)
Make the config for a project, user-defined
values or constructors are merged into
fr.jeremyschoffen.mbt.alpha.default.config/base
then the config is computed using
fr.jeremyschoffen.mbt.alpha.default.config/compute-conf
.
Make the config for a project, `user-defined` values or constructors are merged into [[fr.jeremyschoffen.mbt.alpha.default.config/base]] then the config is computed using [[fr.jeremyschoffen.mbt.alpha.default.config/compute-conf]].
(config-calc f & deps)
Define a computation to be made in the config.
args:
f
: a function of 1 argument (map whose keys are the deps
) that returns a value to be placed in the config.deps
: keywords declaring which keys of the config the computation depends on.Define a computation to be made in the config. args: - `f`: a function of 1 argument (map whose keys are the `deps`) that returns a value to be placed in the config. - `deps`: keywords declaring which keys of the config the computation depends on.
(config-clone-key k)
Make a calc using fr.jeremyschoffen.mbt.alpha.default.config/calc
to easily duplicate a value in the config.
(calc :k :k)
; <=>
(clone-val :k)
Make a calc using [[fr.jeremyschoffen.mbt.alpha.default.config/calc]] to easily duplicate a value in the config. ```clojure (calc :k :k) ; <=> (clone-val :k) ```
(config-compute conf)
Takes a config and compute the parts marked for computation.
A config is a map from keys to values. Special values are made
using the fr.jeremyschoffen.mbt.alpha.default.config.impl/calc
function.
It marks these values of the config map for computation.
Takes a config and compute the parts marked for computation. A config is a map from keys to values. Special values are made using the [[fr.jeremyschoffen.mbt.alpha.default.config.impl/calc]] function. It marks these values of the config map for computation.
(config-print-deps config)
Use ubergraph to pprint the dependency graph of config values.
Use ubergraph to pprint the dependency graph of config values.
(deps-make-git-coords {u :fr.jeremyschoffen.mbt.alpha.project/git-url
:as param})
Make the map representation of a git dependency in a deps.edn
file. Here the git tag
corresponding to the version is used to recover the commit's sha associated with it.
For instance:
(make-deps-coord
{:...mbt.alpha.maven/group-id 'org.something
:...mbt.alpha.maven/artefact-name 'my-lib
:...mbt.alpha.project/git-url "https://github.com/yourname/my-lib"
:...mbt.alpha.versioning/tag-base-name "my-lib"
:...mbt.alpha.versioning/version a-version})
;=> {:org.something/mylib {:git/url "https://github.com/yourname/my-lib\"
:sha "sha of the tag at my-lib-va-version"}}
Make the map representation of a git dependency in a `deps.edn` file. Here the git tag corresponding to the version is used to recover the commit's sha associated with it. For instance: ```clojure (make-deps-coord {:...mbt.alpha.maven/group-id 'org.something :...mbt.alpha.maven/artefact-name 'my-lib :...mbt.alpha.project/git-url "https://github.com/yourname/my-lib" :...mbt.alpha.versioning/tag-base-name "my-lib" :...mbt.alpha.versioning/version a-version}) ;=> {:org.something/mylib {:git/url "https://github.com/yourname/my-lib\" :sha "sha of the tag at my-lib-va-version"}} ```
(deps-make-maven-coords {v :fr.jeremyschoffen.mbt.alpha.project/version
:as param})
Make the map representation of a maven dependency in a deps.edn
file.
For instance:
(make-deps-coord
{:...mbt.alpha.maven/group-id 'org.clojure
:...mbt.alpha.maven/artefact-name 'clojure
:...mbt.alpha.project/version "10.0.1"})
;=> {:org.clojure/clojure {:mvn/version "10.0.1"}}
Make the map representation of a maven dependency in a `deps.edn` file. For instance: ```clojure (make-deps-coord {:...mbt.alpha.maven/group-id 'org.clojure :...mbt.alpha.maven/artefact-name 'clojure :...mbt.alpha.project/version "10.0.1"}) ;=> {:org.clojure/clojure {:mvn/version "10.0.1"}} ```
(generate-then-commit! conf & fns)
Helper function intended to be used to automatically commit some generated files.
Several steps are taken:
fr.jeremyschoffen.mbt.alpha.default.versioning/check-repo-in-order
.conf
through fns
using [[fr.jeremyschoffen.mbt.alpha.utils//thread-fns]].fr.jeremyschoffen.mbt.alpha.core/git-add-all!
Args:
conf
: a map, the build's configurationfns
: functions, presumably functions generating docs or a version file.Helper function intended to be used to automatically commit some generated files. Several steps are taken: 1) Check the repo using [[fr.jeremyschoffen.mbt.alpha.default.versioning/check-repo-in-order]]. 2) Thread `conf` through `fns` using [[fr.jeremyschoffen.mbt.alpha.utils//thread-fns]]. 3) Add all the new files to git using [[fr.jeremyschoffen.mbt.alpha.core/git-add-all!]] 4) Commit all the generated files. Args: - `conf`: a map, the build's configuration - `fns`: functions, presumably functions generating docs or a version file.
A simple version scheme based on git-distance. There is only one version number starting at 0 on a specific commit. It then becomes the number of commits from the initial version bumps after bumps.
This system allows for the use of alpha and beta qualifiers. A version without a qualifier can't go back to alpha nor
beta. To use them they need to be specified when the initial version is made conforming to the
:git-distance/qualifier
spec.
To specify a qualifier:
level
parameter is
usedfr.jeremyschoffen.mbt.alpha.default.versioning.schemes/initial-version
the qualifier is passed using
the key :versioning/bump-level
of the config map.
``A simple version scheme based on git-distance. There is only one version number starting at 0 on a specific commit. It then becomes the number of commits from the initial version bumps after bumps. This system allows for the use of alpha and beta qualifiers. A version without a qualifier can't go back to alpha nor beta. To use them they need to be specified when the initial version is made conforming to the `:git-distance/qualifier` spec. To specify a qualifier: - using [[fr.jeremyschoffen.mbt.alpha.default.versioning.schemes.protocols/initial-version]] the `level` parameter is used - using [[fr.jeremyschoffen.mbt.alpha.default.versioning.schemes/initial-version]] the qualifier is passed using the key `:versioning/bump-level` of the config map. ``
(maven-deploy! param)
Deploy a jar of the current project into the a remote maven repo.
It starts by ensuring that the config has a :fr...mbt.alpha.maven.deploy/artefacts
key and compute a value with
fr.jeremyschoffen.mbt.alpha.default.maven/ensure-deploy-artefacts
if necessary.
After checking the actual existence of the deployment artefacts uses maven to install them.
Deploy a jar of the current project into the a remote maven repo. It starts by ensuring that the config has a `:fr...mbt.alpha.maven.deploy/artefacts` key and compute a value with [[fr.jeremyschoffen.mbt.alpha.default.maven/ensure-deploy-artefacts]] if necessary. After checking the actual existence of the deployment artefacts uses maven to install them.
(maven-install! param)
Install a jar of the current project into the local maven repo.
It starts by ensuring that the config has a :fr...mbt.alpha.maven.deploy/artefacts
key, compute a value with
fr.jeremyschoffen.mbt.alpha.default.maven/make-usual-artefacts
if necessary.
After checking the actual existence of the deployment artefacts uses maven to install them.
Install a jar of the current project into the local maven repo. It starts by ensuring that the config has a `:fr...mbt.alpha.maven.deploy/artefacts` key, compute a value with [[fr.jeremyschoffen.mbt.alpha.default.maven/make-usual-artefacts]] if necessary. After checking the actual existence of the deployment artefacts uses maven to install them.
A maven version scheme. The versioning starts at the first versioned commit. Supports the following bumps:
:patch
:minor
:major
:alpha
:beta
:rc
:release
A maven version scheme. The versioning starts at the first versioned commit. Supports the following bumps: - `:patch` - `:minor` - `:major` - `:alpha` - `:beta` - `:rc` - `:release`
(maven-sync-pom! {pom-path :fr.jeremyschoffen.mbt.alpha.maven.pom/path
:as param})
Function similar to clojure.tools.deps.alpha.gen.pom/sync-pom
with added behaviour.
This function fills the maven coordinates for the project, the licenses and scm parts.
Also returns the map version of the synced xml.
Function similar to `clojure.tools.deps.alpha.gen.pom/sync-pom` with added behaviour. This function fills the maven coordinates for the project, the licenses and scm parts. Also returns the map version of the synced xml.
A semver version scheme. The versioning starts at the first versioned commit. Supports the following bumps:
:patch
:minor
:major
A semver version scheme. The versioning starts at the first versioned commit. Supports the following bumps: - `:patch` - `:minor` - `:major`
(versioning-current-version param)
Get the current version using the provided version scheme.
Get the current version using the provided version scheme.
(versioning-get-tag param)
Recover a git tag based on a version and a tag base name.
Recover a git tag based on a version and a tag base name.
(versioning-initial-version
{h :fr.jeremyschoffen.mbt.alpha.versioning/scheme
level :fr.jeremyschoffen.mbt.alpha.versioning/bump-level})
Get the initial version for a version scheme.
Get the initial version for a version scheme.
(versioning-last-version param)
Return the last tagged version.
Return the last tagged version.
(versioning-next-version param)
Get the next version using the provided version scheme.
Get the next version using the provided version scheme.
(versioning-project-version {v :fr.jeremyschoffen.mbt.alpha.versioning/version})
Get a ...mbt.alpha.project/version
from a ...mbt.alpha.versioning/version
.
Get a `...mbt.alpha.project/version` from a `...mbt.alpha.versioning/version`.
(versioning-tag-new-version! param)
Create a new tag in git marking a new milestone in the project.
Create a new tag in git marking a new milestone in the project.
(versioning-update-scm-tag conf)
Update the [:...mbt.alpha.maven/scm :...mbt.alpha.maven.scm/tag]
part of the config
with th name of the commit whose last version tag points to.
Update the `[:...mbt.alpha.maven/scm :...mbt.alpha.maven.scm/tag]` part of the config with th name of the commit whose last version tag points to.
(write-version-file! {dest :fr.jeremyschoffen.mbt.alpha.version-file/path
:as param})
Make the string content of a version file and spit it at the destination specified under the key
:version-file/path
.
Make the string content of a version file and spit it at the destination specified under the key `:version-file/path`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close