nrwl-nx - nx affected not working with --base and --head
问题描述
I'm trying to run nx affected:build
inside a GitHub push
action, yet I'm getting the No projects with build were run
(this happens against lint/test/build). I know for a fact that projects are affected b/c I run nx affected:build
on them prior to making a PR and the build runs.
At first I suspected it might be because I was operating in the Github push
action. So I tried using various --base
and --head
parameters, but nothing worked.
Then I tried running these same commands locally, and nx affected:build
still produced nothing, even though git diff
clearly showed that a project was affected. It's only until I run nx affected:build ==base=<branch>
that the affected project will be built.
Eg:
// Doesn't work, even though there is a diff.
nx affected:build --base=197458c645479844fc235ea09b5ae12048b7fa35 --head=da8fad48d67bd8a0c59b8fbecba0bdf7c90fdf6e
// Works
nx affected:build --base=develop
What am I missing here? Why can't I supply --base
and --head
parameters to specify the exact commits to run nx affected
against?
解决方案
看来我有base
和head
倒退:
--base Base of the current branch (usually master)
--head Latest commit of the current branch (usually HEAD)
当我切换 SHA 时,nx affected
产生了预期的结果。
推荐阅读
- javascript - Bootstrap表格过滤器控制搜索使用后如何清除输入框
- apache-kafka - Kafka-在复合键上加入 KStream 和 KTable
- delphi - 构建工具宏失败的解决方法?
- python - 在 imshow 和 Legend 中调整散点图大小
- python - cv2.Rodrigues() 在相机校准环境中应用于 rvec 的目的是什么
- c# - 使用实体框架核心更新多条记录
- r - 为什么使用`[[]]`访问不存在的`data.table`列不会给出像x [,j]这样的错误
- javascript - Flexbox Justify Content Space 项目之间的分布不均匀
- html - 不要在图标列表组下换行
- reporting-services - 报表生成器中的总计错误 - 平均值和总和