我正在尝试设置BITRISE CLI,我无法使用BITRISE CLI下载项目源代码。如何在本地机器中使用位升cli克隆托管在git集线器中的项目?
发布于 2018-05-26 09:32:53
Bitrise CLI被设计成以两种不同的方式使用:
如果您在Mac/PC上安装了CLI和bitrise run,那么它将以第二种模式运行,这意味着您已经有了代码,因此将跳过相关步骤。
在CI环境中,或者如果您想在您自己的Mac/PC上强制使用"CI模式“,您应该在运行位上升cli之前将CI环境变量设置为true。CLI还有一个命令行标志选项,可用于激活此模式:
$ bitrise --help
NAME: bitrise - Bitrise Automations Workflow Runner
USAGE: bitrise [OPTIONS] COMMAND/PLUGIN [arg...]
VERSION: 1.16.1
GLOBAL OPTIONS:
--loglevel value, -l value Log level (options: debug, info, warn, error, fatal, panic). [$LOGLEVEL]
--debug If true it enabled DEBUG mode. If no separate Log Level is specified this will also set the loglevel to debug. [$DEBUG]
--ci If true it indicates that we're used by another tool so don't require any user input! [$CI]
--pr If true bitrise runs in pull request mode.
--help, -h show help
--version, -v print the version
...如您所见,可以使用--ci标志来启用此模式(例如,bitrise --ci run ...)以及CI环境变量。
当您运行Bitrise模式时,它将简单地将.IsCI run_if条件设置为true,否则在非CI模式下它就是false。这意味着,有一些步骤利用此标志,默认情况下将标记为,使其仅在CI模式下运行--例如,参见Git步骤的定义:https://github.com/bitrise-io/steps-git-clone/blob/13fc7d29662bc68aaead618a72d499fb0f031d6c/step.yml#L18
当然,您可以在自己的bitrise.yml中覆盖这个bitrise.yml,这只是默认的配置。
因此,强制在任何环境中运行步骤的另一种方法是在bitrise.yml中使用run_if: true标记它。
相关链接:
https://stackoverflow.com/questions/50475935
复制相似问题