Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Added new task for fixing up submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
grumpydev committed Nov 2, 2011
1 parent e5ab3fa commit 511293c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ def self.logged_chdir(dir, &block)
end
end

desc "Updates all sub project submodules to point at master"
task :fix_submodules do
puts "Fixing all submodules to point to master"

Dir.logged_chdir WORKING_DIRECTORY do
SUB_PROJECTS.each do |project|
Dir.logged_chdir project do
Git.prep_submodules rescue nil

Dir.logged_chdir 'dependencies/nancy' do
Git.checkout 'master'
end

Git.add '.'
Git.commit 'Updated submodule'
Git.push 'origin master'
end
end
end
end

desc "Cleans up (deletes!) the working directory"
task :clean_working do
puts "Deleting working folder" if File.exists? WORKING_DIRECTORY
Expand Down

0 comments on commit 511293c

Please sign in to comment.