Conan 锁定¶
conan lock
命令包含多个子命令。除了这些命令之外,大多数计算图表的 Conan 命令,例如 create
、install
、graph
,都可以接收锁定文件作为输入,并生成锁定文件作为输出。
Conan 锁定添加:手动将项目添加到锁定文件
Conan 锁定移除:手动从锁定文件删除项目
Conan 锁定创建:评估依赖关系图并保存锁定文件
Conan 锁定合并:将多个现有的锁定文件合并成一个。
Conan 锁定更新:手动更新锁定文件中的项目
$ conan lock -h
usage: conan lock [-h] [-v [V]] [-cc CORE_CONF]
{add,create,merge,remove,update} ...
Create or manage lockfiles.
positional arguments:
{add,create,merge,remove,update}
sub-command help
add Add requires, build-requires or python-requires to an
existing or new lockfile. The resulting lockfile will
be ordered, newer versions/revisions first. References
can be supplied with and without revisions like "--
requires=pkg/version", but they must be package
references, including at least the version, and they
cannot contain a version range.
create Create a lockfile from a conanfile or a reference.
merge Merge 2 or more lockfiles.
remove Remove requires, build-requires or python-requires
from an existing lockfile. References can be supplied
with and without revisions like "--
requires=pkg/version",
update Update requires, build-requires or python-requires
from an existing lockfile. References that matches the
arguments package names will be replaced by the
arguments. References can be supplied with and without
revisions like "--requires=pkg/version",
options:
-h, --help show this help message and exit
-v [V] Level of detail of the output. Valid options from less
verbose to more verbose: -vquiet, -verror, -vwarning,
-vnotice, -vstatus, -v or -vverbose, -vv or -vdebug,
-vvv or -vtrace
-cc CORE_CONF, --core-conf CORE_CONF
Define core configuration, overwriting global.conf
values. E.g.: -cc core:non_interactive=True