我正在尝试使用 Jenkins 设置语义发布,我逐步浏览了文档、eggheadio、Github 问题,当然还有 Google。我被困住了,需要一些帮助。
.npmrc
registry=https://nexus.<org>.com/repository/npm_registry/
email=<email>
always-auth=true
_auth=<auth>
//nexus.<org>.com/repository/npm_registry/:_authToken=<token>
我不认为我的任何事情.npmrc
是错误的。我可以很好地发布到我的 Nexus 工件存储库。
这是在我的 package.json
"semantic-release":"semantic-release pre && npm publish && semantic-release post"
和语义 cli 设置中,我的版本默认为"version": "0.0.0-development"
我收到错误的地方是我运行semantic-release pre
. 此命令不适用于我的开发机器和 Jenkins CI 服务器。尝试在我的 Jenkins 服务器上发布时出现此错误...
semantic-release WARN pre semantic-release didn’t run on Travis CI and therefore a new version won’t be published.
semantic-release WARN pre You can customize this behavior using "verifyConditions" plugins: git.io/sr-plugins
semantic-release ERR! commits The commit the last release of this package was derived from is not in the direct history of the "master" branch.
semantic-release ERR! commits This means semantic-release can not extract the commits between now and then.
semantic-release ERR! commits This is usually caused by force pushing, releasing from an unrelated branch, or using an already existing package name.
semantic-release ERR! commits You can recover from this error by publishing manually or restoring the commit "f92012978d1c5f48c3f88d2150bf9c9cfba9c04e".
semantic-release ERR! commits Here is a list of branches that still contain the commit in question:
semantic-release ERR! commits * * (HEAD detached at a09cd81)
semantic-release ERR! pre Failed to determine new version.
semantic-release ERR! pre ENOTINHISTORY Commit not in history
如果您对我在开发机器上收到的错误感到好奇:
semantic-release WARN pre semantic-release didn’t run on Travis CI and therefore a new version won’t be published.
semantic-release WARN pre You can customize this behavior using "verifyConditions" plugins: git.io/sr-plugins
semantic-release ERR! pre Failed to determine new version.
semantic-release ERR! pre ENOCHANGE There are no relevant changes, so no new version is released.
我希望这是足够的信息,但请询问您是否需要更多信息!