Skip to content

Instantly share code, notes, and snippets.

@maikschneider
Created May 13, 2024 11:37
Show Gist options
  • Save maikschneider/ccaaa6b09d41d781642b289ffc38e07e to your computer and use it in GitHub Desktop.
Save maikschneider/ccaaa6b09d41d781642b289ffc38e07e to your computer and use it in GitHub Desktop.
<?php
use SourceBroker\DeployerExtendedTypo3\Utility\ConsoleUtility;
task('migrate:cleanup', function () {
$verbosity = (new ConsoleUtility())->getVerbosityAsParameter();
if (!get('is_argument_host_the_same_as_local_host')) {
run('cd {{release_or_current_path}} && {{bin/php}} {{bin/deployer}} migrate:cleanup {{argument_host}} ' . $verbosity);
} else {
runLocally('cat .upgrade/cleanup.sql | {{bin/typo3cms}} database:import ' . $verbosity);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment