summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Duffield <tom@chef.io>2017-02-09 18:52:41 -0600
committerTom Duffield <tom@chef.io>2017-02-09 18:54:17 -0600
commit87237af12641de0f7c8db57640617d2ff8e8ee5a (patch)
tree51c2077b1ab080266f14123c10c3990bbf5eb5cc
parent8303aed3815db43905570a48339b0eca0999bf8b (diff)
downloadchef-87237af12641de0f7c8db57640617d2ff8e8ee5a.tar.gz
Make it so you can actually run rake:dependencies locally
Signed-off-by: Tom Duffield <tom@chef.io>
-rwxr-xr-xci/dependency_update.sh2
-rw-r--r--tasks/dependencies.rb18
2 files changed, 15 insertions, 5 deletions
diff --git a/ci/dependency_update.sh b/ci/dependency_update.sh
index 9588652143..65b67be526 100755
--- a/ci/dependency_update.sh
+++ b/ci/dependency_update.sh
@@ -4,6 +4,6 @@ set -evx
. ci/bundle_install.sh
-bundle exec rake dependencies
+bundle exec rake dependencies_ci
git checkout .bundle/config
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index 0b216f8e52..189a147fe1 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -21,9 +21,17 @@ require_relative "../version_policy"
desc "Tasks to update and check dependencies"
namespace :dependencies do
- # Update all dependencies to the latest constraint-matching version
+
+ # Running update_ci on your local system wont' work. The best way to update
+ # dependencies locally is by running the dependency update script.
desc "Update all dependencies. dependencies:update to update as little as possible."
- task :update => %w{
+ task :update do |t, rake_args|
+ system("#{File.join(Dir.pwd, "ci", "dependency_update.sh")}")
+ end
+
+ # Update all dependencies to the latest constraint-matching version
+ desc "Update all dependencies. dependencies:update to update as little as possible (CI-only)."
+ task :update_ci => %w{
dependencies:update_gemfile_lock
dependencies:update_omnibus_overrides
dependencies:update_omnibus_gemfile_lock
@@ -130,6 +138,8 @@ namespace :dependencies do
end
end
end
+
desc "Update all dependencies and check for outdated gems."
-task :dependencies => [ "dependencies:update", "bundle:outdated" ]
-task :update => [ "dependencies:update", "bundle:outdated"]
+task :dependencies_ci => [ "dependencies:update_ci", "bundle:outdated" ]
+task :dependencies => [ "dependencies:update" ]
+task :update => [ "dependencies:update" ]