A question regarding af…
A question regarding affected
:
I’m using this command:
npm run affected:dep-graph
And I get the whole tree red.
I run this command:
npm run affected:dep-graph --base=<commit-hash> --head=<next-commit-hash>
I still get the whole graph red - even though I changed only some lib that’s still not imported by any other app or lib.
Is this the right way to use the affected:dep-graph
?
P.S. I’ve used it long ago, when nrwl/nx was only angular, and had no such issues
Responses:
I’m trying to use affected:build for building apps after a pull requests has been merged. Not sure what is the right way for my case as well.
What we are doing is to save the commit hash of the master on every build to know what to compare next time.
So if a PR is merged you check the new commit hash against the saved one in the affected command. This way you run only affected apps in your master build which were touched
would this do the trick?
--base=origin/master~1 --head=origin/master
I’ll give it a try tomorrow :slightly_smiling_face: