| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
✅ Deploy Preview for python-cpython-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Sorry, something went wrong.
|
Thanks! Looks like it needs a bit of tuning. I added this to my fork's main, which has Netlify enabled: hugovk@71faec4 Then created two PRs inside my fork, one with a Lib/ change, another with a Doc/ change: But Netlify built both. |
Sorry, something went wrong.
|
Hm, maybe like this? |
Sorry, something went wrong.
|
Added that to my fork's main: hugovk@24060c3 Rebased the two PRs but both had Netlify builds. |
Sorry, something went wrong.
|
This command should work: git diff --name-only | grep -q '^Doc/' && exit 1 || exit 0
Prep: echo 'a' >> Doc/glossary.rstLocal tests (I use echo instead of exit for demo): » git diff --name-only | grep -q '^Lib/' && echo 1 || echo 0
0
» git diff --name-only | grep -q '^Doc/' && echo 1 || echo 0
1Do you agree? |
Sorry, something went wrong.
|
With local testing, yes. With Netlify, no... hugovk@abbc30d shows "Deploy Preview canceled." for both PRs... hugovk#34 with no docs change: 7:35:00 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --name-only | grep -q '^Doc/' && exit 1 || exit 0' 7:35:01 PM: User-specified ignore command returned exit code 0. Returning early from build. 7:35:01 PM: Creating deploy upload records 7:35:01 PM: Failed during stage 'checking build content for changes': Canceled build due to no content change 7:35:01 PM: Finished processing build request in 13.44133397s hugovk#35 with docs change: 7:35:15 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --name-only | grep -q '^Doc/' && exit 1 || exit 0' 7:35:16 PM: User-specified ignore command returned exit code 0. Returning early from build. 7:35:16 PM: Creating deploy upload records 7:35:17 PM: Failed during stage 'checking build content for changes': Canceled build due to no content change 7:35:17 PM: Finished processing build request in 12.800699818s Rewinding and looking at the logs for #100074 (comment): hugovk#34 without docs change: 4:57:39 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF Doc/ netlify.toml' 4:57:40 PM: fatal: ambiguous argument 'Doc/': unknown revision or path not in the working tree. 4:57:40 PM: Use '--' to separate paths from revisions, like this: 4:57:40 PM: 'git <command> [<revision>...] -- [<file>...]' hugovk#35 with docs change: 4:56:02 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF Doc/ netlify.toml' 4:56:02 PM: fatal: ambiguous argument 'Doc/': unknown revision or path not in the working tree. 4:56:02 PM: Use '--' to separate paths from revisions, like this: 4:56:02 PM: 'git <command> [<revision>...] -- [<file>...]' So we've already set base = "Doc/", where:
So let's try git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml: hugovk@1810da0 I also cleared the deploy caches, in case the rebase/force pushes hugovk#34 without docs change - no Netlify build! ✅: 8:13:58 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml' 8:13:58 PM: User-specified ignore command returned exit code 0. Returning early from build. 8:13:58 PM: Creating deploy upload records 8:13:58 PM: Failed during stage 'checking build content for changes': Canceled build due to no content change 8:13:59 PM: Finished processing build request in 37.864234653s hugovk#35 with docs change - has Netlify build! ✅: 8:11:51 PM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../netlify.toml' 8:11:51 PM: Section completed: initializing 8:11:51 PM: Starting build script ... So let's try this! |
Sorry, something went wrong.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
Thanks, base is something I have completely missed! |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you, let's give this a shot!
Sorry, something went wrong.
|
Thank you for testing and finding a solution ;) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR will trigger the netlify build because of netlify.toml change, but hopefully it won't trigger changes anymore for other builds without ./Doc or ./Misc changes.
Open question: do we need ./Misc here? All NEWS go there, many PRs have it. But, I don't think we are really interested in rendering news. Opinions?
CC @Mariatta @hugovk @epicfaace