diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-08-20 09:51:18 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-08-20 09:51:18 +0100 |
commit | 3d12cbe6ee7ff49dad9a473efc0792b2a4f4cba6 (patch) | |
tree | 1c43d3a004293f442f61b0e64847a4ef16cacd2a /lib/tasks/submodules.rake | |
parent | c449240a1b1cddebb53e9748b15be43c0f65c463 (diff) | |
parent | 4b95ccffc468c256d6ba6248303dd2b78bf5896a (diff) |
Merge branch 'release/0.13' into wdtk
Conflicts:
locale/he_IL/app.po
locale/hr_HR/app.po
locale/nb_NO/app.po
locale/uk/app.po
Diffstat (limited to 'lib/tasks/submodules.rake')
-rw-r--r-- | lib/tasks/submodules.rake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/tasks/submodules.rake b/lib/tasks/submodules.rake new file mode 100644 index 000000000..426192713 --- /dev/null +++ b/lib/tasks/submodules.rake @@ -0,0 +1,28 @@ + +namespace :submodules do + + desc "Check the status of the project's submodules" + task :check => :environment do + commit_info = `git submodule status commonlib` + case commit_info[0,1] + when '+' + $stderr.puts "Error: Currently checked out submodule commit for commonlib" + $stderr.puts "does not match the commit expected by this version of Alaveteli." + $stderr.puts "You can update it with 'git submodule update'." + exit(1) + when '-' + $stderr.puts "Error: Submodule commonlib needs to be initialized." + $stderr.puts "You can do this by running 'git submodule update --init'." + exit(1) + when 'U' + $stderr.puts "Error: Submodule commonlib has merge conflicts." + $stderr.puts "You'll need to resolve these to run Alaveteli." + exit(1) + when ' ' + exit(0) + else + raise "Unexpected status character in response to 'git submodule status commonlib': #{commit_info[0,1]}" + end + end + +end |