Last active
August 29, 2015 14:01
-
-
Save redroot/acf3b8235ba8cb99ae2b to your computer and use it in GitHub Desktop.
How to get bundler command line working inside bundle exec
This file contains hidden or 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
| namespace :update do | |
| task :services do | |
| REPOS.each do |repo_path| | |
| uncommitted_files = `cd #{repo_path} && git status --porcelain | wc -l`.strip.chomp.to_i | |
| if uncommitted_files == 0 | |
| puts "Updating #{repo_path} ..." | |
| puts `cd #{repo_path} && bundle update config-gem` | |
| puts `cd #{repo_path} && git commit -a -m "Updated config-gem"` | |
| puts `cd #{repo_path} && git pull --rebase && git push` | |
| else | |
| puts "#{repo_path} has uncommitted files, skipping ..." | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment