0

我的目标是配置semantic-release从受保护的分支创建标签,如下所示:

npx semantic-release --plugins @semantic-release/commit-analyzer --branches {'name': 'release/super-feature', 'prerelease': true}

我期待该标签1.0.0-super-feature将被创建。但是,我遇到了一个例外:

[semantic-release] › ✖  EINVALIDBRANCH A branch is invalid in the `branches` configuration.
Each branch in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches) must be either a string, a regexp or an object with a name property.
Your configuration for the problematic branch is ``.
[10:03:55 AM] [semantic-release] › ✖  EINVALIDBRANCH A branch is invalid in the `branches` configuration.
Each branch in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches) must be either a string, a regexp or an object with a name property.
Your configuration for the problematic branch is ``.
AggregateError: 
    SemanticReleaseError: A branch is invalid in the `branches` configuration.
        at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-error.js:6:10)
        at /usr/local/lib/node_modules/semantic-release/lib/verify.js:36:19
        at Array.forEach (<anonymous>)
        at module.exports (/usr/local/lib/node_modules/semantic-release/lib/verify.js:32:12)
        at async run (/usr/local/lib/node_modules/semantic-release/index.js:54:3)
        at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:260:22)
        at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5)
    SemanticReleaseError: A branch is invalid in the `branches` configuration.
        at module.exports (/usr/local/lib/node_modules/semantic-release/lib/get-error.js:6:10)
        at /usr/local/lib/node_modules/semantic-release/lib/verify.js:36:19
        at Array.forEach (<anonymous>)
        at module.exports (/usr/local/lib/node_modules/semantic-release/lib/verify.js:32:12)
        at async run (/usr/local/lib/node_modules/semantic-release/index.js:54:3)
        at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:260:22)
        at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5)
    at module.exports (/usr/local/lib/node_modules/semantic-release/lib/verify.js:41:11)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async run (/usr/local/lib/node_modules/semantic-release/index.js:54:3)
    at async module.exports (/usr/local/lib/node_modules/semantic-release/index.js:260:22)
    at async module.exports (/usr/local/lib/node_modules/semantic-release/cli.js:55:5) {
  name: 'AggregateError'
}

你能帮我理解什么是错的 - CLI 参数或我的期望吗?

4

0 回答 0