From 2a10f6816207b51b9a67ec3da83844224031ebbb Mon Sep 17 00:00:00 2001 From: Arthur Del Esposte Date: Thu, 27 Aug 2015 15:36:03 -0300 Subject: [PATCH] Add exported_data task to export Software Catalog data to CSV --- Rakefile | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/Rakefile b/Rakefile index bca5e60..8d18198 100644 --- a/Rakefile +++ b/Rakefile @@ -122,6 +122,14 @@ task :restore => [ssh_config_file, config_file] do sh 'ssh', '-F', ssh_config_file, 'integration', 'sudo', 'systemctl start colab' end +task :export_data => [ssh_config_file, config_file] do + # setup + sh 'mkdir', '-p', 'exported_data' + #social + sh 'ssh', '-F', ssh_config_file, 'social', 'cd /usr/lib/noosfero/ && sudo -u noosfero RAILS_ENV=production bundle exec rake export:catalog:csv' + sh 'scp', '-F', ssh_config_file, 'social:/tmp/software_catalog_csvs.tar.gz', 'exported_data/' +end + task :bootstrap_common => 'config/local/ssh_config' unless ENV['nodeps'] -- libgit2 0.21.2