Greetings, our project is hosted in a monorepo, and while everything appears to be working fine with regards to automatic deployments, I’m having an issue with setting the ignore parameter in my TOML file, and as a result both my sanity dashbord and frontend are getting built and deployed when I only want one or the other to occur when it detects changes in that specific directory.
I have two netlify.toml files in each directory of my project.
root
# My Gatsby Project
-lj-landers-gatsby
--netlify.toml
# My Sanity Project
-lj-landers-sanity
--netlify.toml
My Gatsby TOML is:
[build]
base="lj-landers-gatsby"
publish="public/"
command="gatsby build"
ignore = "git diff --quiet HEAD^ HEAD lj-landers-gatsby/"
My Sanity TOML is:
[build]
base="lj-landers-sanity"
publish="dist/"
command="npm run build"
ignore = "git diff --quiet HEAD^ HEAD lj-landers-sanity/"
As far as I can tell from reading the docs, this should work, but whenever the build process runs in Netlify, it throws the following error when it gets to the ignore logic.
12:18:09 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet HEAD^ HEAD lj-landers-sanity/'
12:18:09 PM: fatal: ambiguous argument 'lj-landers-sanity/': unknown revision or path not in the working tree.
12:18:09 PM: Use '--' to separate paths from revisions, like this:
12:18:09 PM: 'git <command> [<revision>...] -- [<file>...]'
Can someone point me in the right direction as to what we might be doing wrong here?