-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from skateman/fix-bower-caching
Fix the path to the bower directory to make bower caching work
- Loading branch information
Showing
3 changed files
with
29 additions
and
3 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
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,18 @@ | ||
which bower || npm install -g bower | ||
|
||
# Check if the bower cache is valid, otherwise delete it | ||
if ! cmp --silent bower.json spec/manageiq/vendor/assets/bower_components/bower.json; then | ||
rm -rf spec/manageiq/vendor/assets/bower_components | ||
fi | ||
|
||
if [ -d spec/manageiq/vendor/assets/bower_components ]; then | ||
echo "bower assets installed... moving on." | ||
else | ||
bower install --allow-root -F --config.analytics=false | ||
STATUS=$? | ||
echo bower exit code: $STATUS | ||
|
||
# fail the whole test suite if bower install failed | ||
[ $STATUS = 0 ] || exit 1 | ||
[ -d spec/manageiq/vendor/assets/bower_components ] || exit 1 | ||
fi |