MDL-63346 travis: GRUNT job immune to npm-shrinkwrap.json changes

When upgrading nodejs/npm versions, there are modifications to
different packages or to the format of the npm-shrinkwrap.json
file. Usually that leads to failed jobs untill the bundled file
is updated.

To avoid that, we just ignore the npm-shrinkwrap.json file, so
just the REAL modifications in css/js/ignore stuff are considered.
This commit is contained in:
Eloy Lafuente (stronk7)
2018-09-20 10:55:20 +02:00
parent e75470d531
commit 094fa8ce8a
+2
View File
@@ -264,7 +264,9 @@ script:
grunt ;
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
git add . ;
git reset -- npm-shrinkwrap.json ;
git diff --cached --exit-code ;
fi