nx affected `head` was set to `master` instead of `HEAD`, which cause every commit to detect a change and deploy.
- Fix head argument for nx affected command
Feedback on the initial PR pointed out the flaw that just assuming
that the previous commit was HEAD~1 would be inaccurate, so this
rewrite instead fetches the appropriate commit for each Fleek project,
does the appropriate nx affected call, and triggers a deploy.
This allows for each project to independently get deployed only when
there is a change that affects it on master.
The script is written to have no dependencies, and lazily uses curl
instead of node http. It feels a bit icky, but for a build script feels
reasonable. Also as the header comment notes, it seems like an nx build
script would be more appropriate, but because it needs the appropriate
commit for each project, I resorted to a shell script.
- Rewrite ./tools/ipfs-deploy.js