0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Merge pull request #17326 from twbs/build/rm-gem

rm broken bundle update task & defunct custom RubyGem caching scheme
This commit is contained in:
Chris Rebert 2015-08-25 23:18:44 -07:00
commit 8644ce0d7e
6 changed files with 2 additions and 44 deletions

View File

@ -7,7 +7,6 @@ node_js:
before_install:
- travis_retry pip install -r test-infra/requirements.txt --user
- rvm install 2.0.0 && rvm use 2.0.0
- export GEMDIR=$(rvm gemdir)
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export TWBS_DO_VALIDATOR=$?; true
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export TWBS_DO_SAUCE=$?; true

View File

@ -399,14 +399,6 @@ module.exports = function (grunt) {
exec: {
npmUpdate: {
command: 'npm update'
},
bundleUpdate: {
command: function () {
// Update dev gems and all the test gemsets
return 'bundle update && ' + glob.sync('test-infra/gemfiles/*.gemfile').map(function (gemfile) {
return 'BUNDLE_GEMFILE=' + gemfile + ' bundle update';
}).join(' && ');
}
}
},
@ -531,7 +523,4 @@ module.exports = function (grunt) {
done();
});
});
// Task for updating the cached RubyGem packages used by the Travis build (which are controlled by test-infra/Gemfile.lock).
// This task should be run and the updated file should be committed whenever Bootstrap's RubyGem dependencies change.
grunt.registerTask('update-gemfile-lock', ['exec:bundleUpdate']);
};

View File

@ -13,16 +13,13 @@ Similar to git, `s3_cache.py` makes the assumption that [SHA-256 will effectivel
### For Bootstrap specifically
`s3_cache.py` is used to cache the npm packages that our Grunt tasks depend on and the RubyGems that Jekyll depends on. (Jekyll is needed to compile our docs to HTML so that we can run them thru an HTML5 validator.)
`s3_cache.py` is used to cache the npm packages that our Grunt tasks depend on.
For npm, the `node_modules` directory is cached based on our `npm-shrinkwrap.json` file.
For RubyGems, the `gemdir` of the current RVM-selected Ruby is cached based on the `pseudo_Gemfile.lock` file generated by our Travis build script.
`pseudo_Gemfile.lock` contains the versions of Ruby and Jekyll that we're using (read our `.travis.yml` for details).
## Why is `s3_cache.py` necessary?
`s3_cache.py` is used to speed up Bootstrap's Travis builds. Installing npm packages and RubyGems used to take up a significant fraction of our total build times. Also, at the time that `s3_cache.py` was written, npm was occasionally unreliable.
`s3_cache.py` is used to speed up Bootstrap's Travis builds. Installing npm packages used to take up a significant fraction of our total build times. Also, at the time that `s3_cache.py` was written, npm was occasionally unreliable.
Travis does offer built-in caching on their paid plans, but this do-it-ourselves S3 solution is significantly cheaper since we only need caching and not Travis' other paid features.

View File

@ -3,10 +3,5 @@
"key": "./npm-shrinkwrap.json",
"cache": "../node_modules",
"generate": "./uncached-npm-install.sh"
},
"rubygems": {
"key": "$BUNDLE_GEMFILE",
"cache": "../vendor/cache",
"generate": "cd .. ; bundle install --path=\"`pwd`/vendor/cache\""
}
}

View File

@ -1,7 +0,0 @@
# Ruby Gems for the 'core' set of tests
# Run `grunt update-gemfile-lock` to update to the latest compatible versions
source 'https://rubygems.org'
gem 'sass', '~> 3.4.9'
gem 'scss-lint', '~> 0.31'

View File

@ -1,15 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
rainbow (2.0.0)
sass (3.4.9)
scss-lint (0.31.0)
rainbow (~> 2.0)
sass (~> 3.4.1)
PLATFORMS
ruby
DEPENDENCIES
sass (~> 3.4.9)
scss-lint (~> 0.31)