Skip to content

Commit

Permalink
Task: Skip in case of CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Apr 8, 2020
1 parent 997dd31 commit 5989765
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/OrmSchemaUpdateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

use Baraja\PackageManager\Composer\BaseTask;
use Baraja\PackageManager\Helpers;
use Baraja\PackageManager\PackageRegistrator;
use Contributte\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Tracy\Debugger;
Expand All @@ -22,6 +23,15 @@ final class OrmSchemaUpdateTask extends BaseTask
*/
public function run(): bool
{
try {
if (PackageRegistrator::getCiDetect() !== null) {
echo 'CI environment detected: Schema generating skipped.';

return true;
}
} catch (\Exception $e) {
}

echo 'Using PHP version: ' . PHP_VERSION . "\n\n";

try {
Expand Down

0 comments on commit 5989765

Please sign in to comment.