From b4fdf8d0fc454f37fb4c682114681a16af081205 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 9 Nov 2016 10:43:41 +0000 Subject: [PATCH] NEW Skip tests with --skip-tests flag --- src/Commands/Release/Release.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Commands/Release/Release.php b/src/Commands/Release/Release.php index 8937d7d..34cd936 100644 --- a/src/Commands/Release/Release.php +++ b/src/Commands/Release/Release.php @@ -34,7 +34,8 @@ protected function configureOptions() ->addOption('directory', 'd', InputOption::VALUE_REQUIRED, 'Optional directory to release project from') ->addOption('security', 's', InputOption::VALUE_NONE, 'Update git remotes to point to security project') ->addOption('branch', 'b', InputOption::VALUE_REQUIRED, 'Branch each module to this') - ->addOption('branch-auto', 'a', InputOption::VALUE_NONE, 'Automatically branch to major.minor.patch'); + ->addOption('branch-auto', 'a', InputOption::VALUE_NONE, 'Automatically branch to major.minor.patch') + ->addOption('skip-tests', null, InputOption::VALUE_NONE, 'Skip the tests suite run when performing the release'); } protected function fire() @@ -60,9 +61,11 @@ protected function fire() $translate = new UpdateTranslations($this, $directory, $modules); $translate->run($this->input, $this->output); - // Run tests - $test = new RunTests($this, $directory); - $test->run($this->input, $this->output); + if (!$this->input->hasOption('skip-tests')) { + // Run tests + $test = new RunTests($this, $directory); + $test->run($this->input, $this->output); + } // Generate changelog $changelogs = new CreateChangelog($this, $version, $fromVersion, $directory, $modules);