Skip to content
Snippets Groups Projects
Commit d9d6f9b7 authored by Prem Sichanugrist's avatar Prem Sichanugrist
Browse files

Introduce `rake cms:import` task to import data

Usage: `rake cms:import DATA_DIR=<path_to_your_data_dir>`
parent f041fc4a
No related merge requests found
......@@ -159,3 +159,15 @@ end
task :publish => :package do
sh("scp #{BUILD_DIR}/#{NORMALIZED_DEPLOY_NAME}_#{PKG_VERSION}*.deb #{PACKAGE_REPO}")
end
namespace :cms do
desc "Import course data within the given DATA_DIR variable"
task :import do
if 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" +
"Example: \`rake cms:import DATA_DIR=../data\`"
end
end
end
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment