summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-08-29 19:32:10 -0700
committerGitHub <noreply@github.com>2018-08-29 19:32:10 -0700
commitcd957f847548391f6fbe4b755c1189206502d92c (patch)
treea5de6cb0b1dc092e4602d76629d128168ca276b7
parent359a22032d742d24fe04eb54a57a08ddabd42049 (diff)
parent09bc76d86564ee84461498d1c8be99f957afbc7a (diff)
downloadchef-cd957f847548391f6fbe4b755c1189206502d92c.tar.gz
Merge pull request #7602 from chef/lcg/nuke-shitty-rake-tasks
Simplify the rake task to updating gem dependencies
-rw-r--r--.expeditor/update_dep.sh3
-rwxr-xr-xci/dependency_update.sh9
-rw-r--r--tasks/dependencies.rb24
3 files changed, 4 insertions, 32 deletions
diff --git a/.expeditor/update_dep.sh b/.expeditor/update_dep.sh
index c9097d3dea..de820c6bd9 100644
--- a/.expeditor/update_dep.sh
+++ b/.expeditor/update_dep.sh
@@ -20,7 +20,8 @@ bundle install
# the gem is actually available via bundler on rubygems.org.
sleep 120
-bundle exec rake dependencies:update
+gem install rake
+rake dependencies:update_gemfile_lock
git add .
diff --git a/ci/dependency_update.sh b/ci/dependency_update.sh
deleted file mode 100755
index d90d41d91c..0000000000
--- a/ci/dependency_update.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# FIXME: this seems uselessly trivial, replace with a rake task and have ci call the rake task?
-
-set -evx
-
-bundle install --without omnibus_package test pry integration docgen maintenance travis aix bsd linux mac_os_x solaris windows
-
-bundle exec rake dependencies_ci
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb
index 4ffb38cbef..ccdb8389ad 100644
--- a/tasks/dependencies.rb
+++ b/tasks/dependencies.rb
@@ -20,24 +20,9 @@ require "bundler"
desc "Tasks to update and check dependencies"
namespace :dependencies do
- # 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 do |t, rake_args|
- # FIXME: probably broken, and needs less indirection
- system((File.join(Dir.pwd, "ci", "dependency_update.sh")).to_s)
- end
-
- desc "Force update (when adding new gems to Gemfiles)"
- task :force_update do |t, rake_args|
- # FIXME: probably broken, and needs less indirection
- FileUtils.rm_f(File.join(Dir.pwd, ".bundle", "config"))
- system((File.join(Dir.pwd, "ci", "dependency_update.sh")).to_s)
- 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{
+ desc "Update all dependencies."
+ task update: %w{
dependencies:update_gemfile_lock
dependencies:update_omnibus_gemfile_lock
}
@@ -71,8 +56,3 @@ namespace :dependencies do
bundle_update_locked_multiplatform_task :update_omnibus_gemfile_lock, "omnibus"
end
-
-desc "Update all dependencies and check for outdated gems."
-task dependencies_ci: [ "dependencies:update_ci" ]
-task dependencies: [ "dependencies:update" ]
-task update: [ "dependencies:update" ]