forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(travis,grunt): extract the npm install and cache busting logic …
…into install-dependencies.sh So now we are DRY. Added extra error checking and improved the grunt file init setup so that stdio is visible in console. Closes angular#11110
- Loading branch information
Showing
5 changed files
with
31 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,10 +46,8 @@ install: | |
# Log HTTP requests | ||
- npm config set loglevel http | ||
- npm install -g [email protected] | ||
# Instal npm dependcies and ensure that npm cache is not stale (these steps are replicated in lib/grunt/utils.js) | ||
- diff -q npm-shrinkwrap.json node_modules/npm-shrinkwrap.cached.json; if [[ $? -ne 0 ]]; then echo 'Shrinkwrap changed! Blowing away node_modules.'; rm -rf node_modules; fi | ||
- time npm install | ||
- cp npm-shrinkwrap.json node_modules/npm-shrinkwrap.cached.json | ||
# Instal npm dependecies and ensure that npm cache is not stale | ||
- scripts/npm/install-dependencies.sh | ||
|
||
before_script: | ||
- mkdir -p $LOGS_DIR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
SHRINKWRAP_FILE=npm-shrinkwrap.json | ||
SHRINKWRAP_CACHED_FILE=node_modules/npm-shrinkwrap.cached.json | ||
|
||
if diff -q $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE; then | ||
echo 'No shrinkwrap changes detected. npm install will be skipped...'; | ||
else | ||
echo 'Blowing away node_modules and reinstalling npm dependencies...' | ||
rm -rf node_modules | ||
npm install | ||
cp $SHRINKWRAP_FILE $SHRINKWRAP_CACHED_FILE | ||
echo 'npm install successful!' | ||
fi |