本文档翻译自:https://docs.conan.io/en/latest/reference/commands/creator/export.html

    1. $ conan export [-h] [-k] [-l [LOCKFILE]] [--ignore-dirty]
    2. path [reference]

    将配方(conanfile.py和关联文件)复制到本地缓存。
    使用”引用”参数来指定用户和导出位置。 一旦配方进入本地缓存,就可以使用”conan upload”命令将其共享,重复使用并分发到任何远程服务器。

    1. positional arguments:
    2. path Path to a folder containing a conanfile.py or to a
    3. recipe file e.g., my_folder/conanfile.py
    4. reference user/channel, or Pkg/version@user/channel (if name and
    5. version are not declared in the conanfile.py
    6. optional arguments:
    7. -h, --help show this help message and exit
    8. -k, -ks, --keep-source
    9. Do not remove the source folder in the local cache,
    10. even if the recipe changed. Use this for testing
    11. purposes only
    12. -l [LOCKFILE], --lockfile [LOCKFILE]
    13. Path to a lockfile or folder containing 'conan.lock'
    14. file. Lockfile will be updated with the exported
    15. package
    16. --ignore-dirty When using the "scm" feature with "auto" values,
    17. capture the revision and url even if there are
    18. uncommitted changes

    参考字段可以是:
    完整的软件包参考:pkg/version@user/channel。 在这种情况下,配方无需声明名称或版本。 如果配方声明了它们,则它们应与命令行中提供的值匹配。
    user和channel:user/channel。 该命令将假定配方提供名称和版本。
    version,user和channel:version@user/channel。 配方必须提供名称,如果提供了版本,则必须与命令行之一匹配。
    官方挂钩存储库中还有一个”recipe_linter”挂钩,可以将其激活以在导出配方时对它们执行自动棉绒检查。

    Examples
    使用完整参考导出配方。 仅当配方中未声明名称和版本时才有效:

    1. $ conan export . mylib/1.0@myuser/channel

    从myuser / stable用户和通道下的任何文件夹目录导出配方:

    1. $ conan export ./folder_name myuser/stable

    导出配方而不删除本地缓存中的源文件夹:

    1. $ conan export . fenix/stable -k