<p>auto 与非 lerna 项目</p>

创建于 2020-02-21  ·  35评论  ·  资料来源: intuit/auto

描述错误

我在https://github.com/react-native-community/hooks repo 中设置了 auto。 我们没有lerna.json文件,当我运行yarn auto changelog --verbose ,我收到类似的错误

✔  success   Calculated SEMVER bump: patch
ℹ  info      Calculated next version to be: 2.0.3
ℹ  info      Old changelog exists, prepending changes.
ℹ  info      Wrote new changelog to filesystem.
ℹ  info      Getting commits from 2.0.2 to HEAD
ℹ  info      Committed new changelog.
✖  error     Called from: Error
    at Object.execPromise [as default] (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/exec-promise.js:15:22)
    at Object.getLernaPackages (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/get-lerna-packages.js:7:34)
    at /Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/all-contributors/dist/index.js:82:48
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Running command 'npx' with args [lerna, ls, -pl] failed

npx: installed 706 in 55.72s
lerna notice cli v3.20.2
lerna ERR! ENOLERNA `lerna.json` does not exist, have you run `lerna init`?

    at ChildProcess.<anonymous> (/Users/pvinis/Source/react-native-community/hooks/node_modules/@auto-it/core/dist/utils/exec-promise.js:49:24)
    at ChildProcess.emit (events.js:321:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

再现

预期行为

如果 repo 没有配置 lerna,它不应该需要或寻找它并出错,对吗?

截图

桌面(请填写以下信息):

  • 操作系统:[例如iOS]
  • 浏览器 [例如 chrome、safari]
  • 版本 [例如 22]

附加上下文

所有35条评论

你有分行吗? 为此事道歉。 我以为我已经在旧版本中解决了这个问题

我目前无法使用您的 repo 进行复制

在您的 repo 的 master 上,我没有任何错误地执行了以下操作:

yarn add auto
yarn auto changelog --from 2.0.1 -d

输出:

#### 🚀  Enhancement

- trying out auto [#60](https://github.com/react-native-community/hooks/pull/60) ([@pvinis](https://github.com/pvinis))

#### 🐛  Bug Fix

- Update README.md [#61](https://github.com/react-native-community/hooks/pull/61) ([@pvinis](https://github.com/pvinis))
- Create LICENSE [#57](https://github.com/react-native-community/hooks/pull/57) ([@pvinis](https://github.com/pvinis))

#### ⚠️  Pushed to master

- aha  ([@pvinis](https://github.com/pvinis))
- fix(sad): its a sad day when you cant make your tools do what you want.  ([@pvinis](https://github.com/pvinis))
- fix(bla) ok  ([@pvinis](https://github.com/pvinis))
- rename  ([@pvinis](https://github.com/pvinis))
- fix(something): i hate this  ([@pvinis](https://github.com/pvinis))
- again  ([@pvinis](https://github.com/pvinis))
- bla  ([@pvinis](https://github.com/pvinis))
- i give up..  ([@pvinis](https://github.com/pvinis))
- try  ([@pvinis](https://github.com/pvinis))
- bump  ([@pvinis](https://github.com/pvinis))
- upg  ([@pvinis](https://github.com/pvinis))
- test  ([@pvinis](https://github.com/pvinis))
- some baaaasic tests  ([@pvinis](https://github.com/pvinis))
- rename repo to be canonical with the rest and fix links  ([@pvinis](https://github.com/pvinis))

#### Authors: 1

- Pavlos Vinieratos ([@pvinis](https://github.com/pvinis))

😭我几分钟前把它清理干净了🤦‍♂️。

我明天可以在一个分支中重新创建它,但让我在这里列出我发现的内容。

我添加了自动和所有贡献者。 然后我尝试了 auto shipit,即使是空运行,它也会因为 lerna 错误而失败。

然后我删除了所有贡献者,并尝试不使用它。 我有两个问题。 一个是ci抱怨GitHub.com是未经授权的ip什么的。 我在 package.json 上的存储库上切换到 https ,但没有帮助。 另一个问题是 gh 版本和标签没有发生。 在某些时候,我在 package.json 上有一个版本号,另一个被尝试创建为标签,第三个是 npm 版本。 这三个数字都不一样,这让我很困惑,我放弃了。

明天我会重新创造东西。 对不起和谢谢。

. 一个是ci抱怨GitHub.com是未经授权的ip什么的。

https://github.com/intuit/auto/blob/master/.circleci/config.yml#L99

这也在我认为的文档中。 也许我应该重新打开并解决 #550

没有'from'和'd'它可以工作吗?

是的,它什么都不输出

我可以尝试将 PR 放在一起并设置自动。 我有时间。 只要你已经设置了令牌,我应该可以很容易地做到这一点

嗯奇怪。 好吧,我想唯一的方法就是让我的试验回来。 如果可以的话,我明天会做一个 reflog 并将其推送到一个分支中。

ci 设置了令牌。 这将是惊人的。 你想谈论不和谐或更直接的聊天吗? 现在才凌晨 1.26 点,这真是漫长的一天😬

去睡觉! 我会以hooks一起获得 PR,我们明天(或任何时候)都可以接听。 在这里聊天对我来说没问题。 我喜欢公开讨论

如果您可以将我添加为 repo 的合作者,那也太完美了。 我只需要添加一些 git 标签(也许)

@pvinis #969 用户永远不应该遇到已知主机问题! 它现在将尝试对https url 或https + token进行身份验证,以解决该特定问题。

我已邀请您作为合作者。

好的,所以我合并了你的 PR。 我做了一个没有发布标签的公关,它只做了金丝雀,很棒。 我用发布标签做了一个 PR,金丝雀工作,合并,然后 lerna 问题https://app.circleci.com/jobs/github/react-native-community/hooks/114https://app.circleci.com /jobs/github/react-native-community/hooks/130。

另外,奇怪的是,当我将配置移到一个文件中时, https://github.com/react-native-community/hooks/commit/aaca764128470a1096f84a0bf493a746a2fe5168添加了一个带有前缀的 git 标签🤔

起来调查

我们在世界的不同方面都很清楚,哈哈

😅确实如此。 不过我还有一段时间,如果你需要什么我可以帮你。 一个小时左右,我有时间。

所以我认为我实际上需要管理员以便我可以编辑/删除标签。 还:

  1. 有一个错误修复来修复单个包的所有贡献者插件https://github.com/intuit/auto/pull/971

  2. 我认为我们应该删除noVersionPrefix的用法。

  • npm 文档建议反对它https://docs.npmjs.com/misc/config#tag -version-prefix
  • 如果你想要它,我们需要添加一个.npmrc包含tag-version-prefix="" (做出改变的文档调用了这一点)

我认为最好的方法是在标签中添加v 。 更少的设置和更多的标准

我可以根据需要制作标签。 是的,我也这么认为 v. 我不喜欢它,但我想它的摩擦更少。

好的,我删除了前缀配置,现在我们有了v2.4.2 ,所以我想在 lerna 修复完成后,我可以升级,这应该是全部🤞。

我正在为您创建最初的所有贡献者部分。 公关将传入新版本

在 autorc 中它的onlyPublishWithReleaseLabel 。 在 auto.config.js 中,是onlyPublishWithReleaseLabel还是only-publish-with-release-label

标志是烤肉串,当在自动 rc 中时,它们是驼峰式

有效! 所以这是 lerna 的事情,加上版本前缀的事情。

该死,非常感谢你的帮助和这个工具! 我喜欢开源和相关人员。

感谢您使用auto并帮助我让每个人都变得更好! 当新开发人员遇到困难时,我总是尝试改进该工具。

通过#971关闭

我认为我们不支持.js文件https://intuit.github.io/auto/pages/autorc.html。 看起来它只是jsonyml 。 这是出于与 GitHub bot 相关的原因。 @zephraph可以解释更多

啊。 我以为我在某处看到它使用 cosmicconfig。 好的,然后是 json 中的.autorc

是的,这只是一个事实,即 js 文件不能像 JSON/yml 文件那样静态分析,因此构建自动化变得具有挑战性。

此页面是否有帮助?
0 / 5 - 0 等级