generating version tags using semantic-release without the v

对着背影说爱祢 提交于 2021-02-17 05:11:55

问题


How can I use git tags with the format major.minor.patch, without the "v" in the beginning (i.e. versions 1.0.1, 2.0.1)?

I'm using Gitlab CI, but even using the Docker image locally I'm not able to pass the value to tag-format correctly.

What I'm trying to do:

npx --no-install semantic-release --tag-format "\${version}"


The error log:

[8:42:06 PM] [semantic-release] › ✖ ETAGNOVERSION Invalid tagFormat option. The tagFormat (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#tagformat) option must contain the variable version exactly once.

Your configuration for the tagFormat option is ``.

[8:42:06 PM] [semantic-release] › ✖ EINVALIDTAGFORMAT Invalid tagFormat option. The tagFormat (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#tagformat) must compile to a valid Git reference (https://git-scm.com/docs/git-check-ref-format#_description).

Your configuration for the tagFormat option is ``.

AggregateError: SemanticReleaseError: Invalid tagFormat option. at module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/lib/get-error.js:6:10) at module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/lib/verify.js:22:17) at async run (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:53:3) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:259:22) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/cli.js:55:5) SemanticReleaseError: Invalid tagFormat option. at module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/lib/get-error.js:6:10) at module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/lib/verify.js:29:17) at async run (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:53:3) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:259:22) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/cli.js:55:5) at module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/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/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:53:3) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/index.js:259:22) at async module.exports (/usr/local/lib/nodejs/node-v12.16.1-linux-x64/lib/node_modules/semantic-release/cli.js:55:5) { name: 'AggregateError' }npm ERR! code 1

When it says the tagFormat option is ``, it's as if the ${version} is being replaced by empty space...

来源:https://stackoverflow.com/questions/66146949/generating-version-tags-using-semantic-release-without-the-v

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!