我可以在rake任务后继续使用bash脚本吗?

时间:2017-06-09 09:37:34

标签: bash rake rake-task

我创建了一个可以将jira数据迁移到redmine的脚本但是当我运行它时它只运行1个rake任务而不是两个,是否可以在运行rake任务后继续运行脚本?这是我的代码:

#2: Run migration test
while [ $secs -gt 0 ]; do
   echo -ne "Test Migration will start in: $secs\033[0K\r"
   sleep 1
   : $((secs--))
done

rake jira_migration:test_all_migrations RAILS_ENV="production"

#3: Run Migration

while [ $secs -gt 0 ]; do
   echo -ne "Test Migration will start in: $secs\033[0K\r"
   sleep 1
   : $((secs--))
done

rake jira_migration:do_all_migrations RAILS_ENV="production"

printf 'Migration is completed!'

Rake文件任务:

desc "Tests all parsers!"
    task :test_all_migrations => [:environment, :pre_conf,
                                  :test_parse_projects,
                                  :test_parse_users,
                                  :test_parse_comments,
                                  :test_parse_issues] do
      puts "All parsers was run! :-)"
    end

0 个答案:

没有答案