allow for optional 'COURSE_DIR' parameter for the import rake target so that we can import only a single course
This commit is contained in:
4
rakefile
4
rakefile
@@ -421,7 +421,9 @@ end
|
||||
namespace :cms do
|
||||
desc "Import course data within the given DATA_DIR variable"
|
||||
task :import do
|
||||
if ENV['DATA_DIR']
|
||||
if ENV['DATA_DIR'] and ENV['COURSE_DIR']
|
||||
sh(django_admin(:cms, :dev, :import, ENV['DATA_DIR'], ENV['COURSE_DIR']))
|
||||
elsif ENV['DATA_DIR']
|
||||
sh(django_admin(:cms, :dev, :import, ENV['DATA_DIR']))
|
||||
else
|
||||
raise "Please specify a DATA_DIR variable that point to your data directory.\n" +
|
||||
|
||||
Reference in New Issue
Block a user