Source of file ChangeEnvironment.php
Size: 1,662 Bytes - Last Modified: 2020-07-03T12:08:09+00:00
/var/www/docs.ssmods.com/process/src/src/Tasks/IndividualTasks/ChangeEnvironment.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 | <?php namespace Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks; use Sunnysideup\UpgradeToSilverstripe4\Tasks\Task; /** * Runs the silverstripe/upgrade task "environment". See: * https://github.com/silverstripe/silverstripe-upgrader#environment. * You can use this command to migrate an SilverStripe 3 _ss_environment.php * file to the .env format used by SilverStripe 4.' */ class ChangeEnvironment extends Task { protected $taskStep = 's20'; protected $rootDirForCommand = ''; protected $param1 = ''; protected $param2 = ''; protected $settings = ''; public function getTitle() { return 'Change Environment File'; } public function getDescription() { return ' Runs the silverstripe/upgrade task "environment". See: https://github.com/silverstripe/silverstripe-upgrader#environment. You can use this command to migrate a SilverStripe 3 _ss_environment.php file to the Silverstripe 4 .env format.'; } public function runActualTask($params = []) { if ($this->mu()->getIsModuleUpgrade()) { //do nothing } else { $this->runSilverstripeUpgradeTask( 'environment', $this->param1, $this->param2, $this->rootDirForCommand, $this->settings ); $this->setCommitMessage('MAJOR: changing environment file(s)'); } } protected function hasCommitAndPush() { if ($this->mu()->getIsModuleUpgrade()) { return false; } return true; } } |