File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 110110 "build" : " grunt build" ,
111111 "build:dev" : " grunt build --dev" ,
112112 "dev" : " grunt watch --dev" ,
113+ "diff:non-generated" : " sh ./tools/diff-non-generated.sh" ,
113114 "test" : " grunt test" ,
114115 "watch" : " grunt watch" ,
115116 "grunt" : " grunt" ,
139140 "sync-gutenberg-packages" : " grunt sync-gutenberg-packages" ,
140141 "postsync-gutenberg-packages" : " grunt wp-packages:sync-stable-blocks && grunt build --dev && grunt build"
141142 }
142- }
143+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ # Generate a list of all files not marked as auto-generated, and produce a
4+ # pathspec for the `git diff` command so it skips over them.
5+ #
6+ # Example:
7+ #
8+ # ":!/src/wp-includes/assets/script-loader-packages.min.php" ":!/src/..."
9+ GENERATED=$( cat .gitattributes | grep " diff=generated" | cut -w -f1 | sed ' s/^\(.*\)$/":!\1"/g' | paste -sd ' ' -)
10+
11+ # This ENV cannot be passed directly afte the "--", so generate the command.
12+ CMD=" git diff --exit-code -- $GENERATED "
13+
14+ eval $CMD
You can’t perform that action at this time.
0 commit comments