File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 6
6
7
7
[context .deploy-preview ]
8
8
command = " yarn develop"
9
- ignore = " git log -1 --pretty=%B | ( grep -q ' \\ [netlify \\ - ignore\\ ]' ) "
9
+ ignore = " ./scripts/ ignore.sh "
10
10
11
11
[[redirects ]]
12
12
from = " /docs/*"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # grab the latest entry from git log
4
+ log=$( env -i git log -1 --pretty=%B)
5
+
6
+ # run a series of checks for common reasons that we shouldn't preview build.
7
+ # if no checks match, exit with code 1 to run the build
8
+
9
+ # ignore for simple typo fixes
10
+ if echo " $log " | grep -q ' typo' ; then
11
+ exit
12
+ # ignore link / url updates
13
+ elif echo " $log " | grep -q ' link' ; then
14
+ exit
15
+ # ignore when the ignore tag is explicitly added
16
+ elif echo " $log " | grep -q ' netlify\-ignore' ; then
17
+ exit
18
+ # ignore dependabot updates
19
+ elif echo " $log " | grep -q ' dependabot' ; then
20
+ exit
21
+ # ignore when master is merged into a branch
22
+ elif echo " $log " | grep -q ' Merge branch \SMaster\S' ; then
23
+ exit
24
+ else
25
+ exit 1
26
+ fi
27
+
You can’t perform that action at this time.
0 commit comments