Skip to content

Instantly share code, notes, and snippets.

@jmather
Created October 29, 2012 15:06
Show Gist options
  • Select an option

  • Save jmather/3974056 to your computer and use it in GitHub Desktop.

Select an option

Save jmather/3974056 to your computer and use it in GitHub Desktop.
Fun stuff w/ Capifony
before 'symfony:force_migrate', 'phpunit:run_tests'
before 'symfony:cache:warmup', 'symfony:force_migrate'
namespace :phpunit do
desc "Test before making live"
task :run_tests, :roles => :app do
capifony_pretty_print "--> Executing tests"
run "cd #{latest_release} && #{phpunit_bin} -c app/ src/"
capifony_puts_ok
end
end
namespace :symfony do
desc "Force migration to run"
task :force_migrate, :roles => :app do
capifony_pretty_print "--> Running migration"
run "sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} doctrine:migrations:migrate --env=#{symfony_env_prod} --no-interaction'"
capifony_puts_ok
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment