Cargo
kind: cargo
Description
The cargo crawler looks recursively for all cargo crates from a specific root directory. Then for each of them, it tries to update dependencies specified in Cargo.toml
.
This crawler can be enabled either automatically with default behavior by running updatecli diff --experimental
from a directory containing the files to update.
Or by providing a manifest.
Manifests
Parameters
The crawler cargo
supports the following parameters:
Name | Type | Description | Required |
---|---|---|---|
ignore | array | Ignore specifies rule to ignore Cargo.toml update. | |
crates | object | Crates specifies the list of Cargo crates to check | |
path | string | Path specifies a Cargo crate path pattern, the pattern requires to match all of name, not just a subpart of the path. | |
registries | array | Registries specifies the list of Cargo registries to check | |
only | array | Only specify required rule to restrict Cargo.toml update. | |
crates | object | Crates specifies the list of Cargo crates to check | |
path | string | Path specifies a Cargo crate path pattern, the pattern requires to match all of name, not just a subpart of the path. | |
registries | array | Registries specifies the list of Cargo registries to check | |
registries | object | Auths provides a map of registry credentials where the key is the registry URL without scheme | |
rootdir | string | RootDir defines the root directory used to recursively search for Cargo.toml | |
versionfilter | object |
| |
kind | string | specifies the version kind such as semver, regex, or latest | |
pattern | string | specifies the version pattern according the version kind | |
strict | boolean | strict enforce strict versioning rule. Only used for semantic versioning at this time |
Example
# updatecli.d/default.yaml
name: "Cargo compose autodiscovery using git scm"
scms:
default:
kind: git
spec:
url: https://github.com/updatecli-test/cargo-lab.git
branch: "main"
private-registry:
kind: git
spec:
url: "https://github.com/updatecli-test/fake-cargo-registry.git"
branch: "main"
autodiscovery:
scmid: default
crawlers:
cargo:
registries:
fake-private-git:
scmid: private-registry
fake-private-http:
url: "https://updatecli-test.github.io/fake-cargo-registry/api/v1/crates"