Best Atoum code snippet using pusher.tagDevelopmentVersion
pusher.php
Source:pusher.php
...125 if ($this->tagStableVersion($tag = '0.0.' . $tag) === true)126 {127 if ($this->createGitTag($tag) === true)128 {129 if ($this->tagDevelopmentVersion('DEVELOPMENT-' . $tag) === true)130 {131 if ($this->pushToRemote($tag) === true)132 {133 if ($this->pushTagToRemote($tag) === true)134 {135 $this->writeInfo('Tag \'' . $tag . '\' successfully sent to remote \'' . $this->remote . '\'');136 }137 }138 }139 }140 }141 }142 catch (\exception $exception)143 {144 $this->writeError($exception->getMessage());145 }146 return $this;147 }148 private function tagSrcWith($tag)149 {150 $this->taggerEngine151 ->setVersion(sprintf(static::versionPattern, $tag))152 ->tagVersion()153 ;154 return $this;155 }156 private function tagStableVersion($tag)157 {158 $this->tagSrcWith($tag);159 try160 {161 $this->git->addAllAndCommit('Set version to ' . $tag . '.');162 }163 catch (\exception $exception)164 {165 $this->writeError($exception->getMessage());166 $this->git->checkoutAllFiles();167 return false;168 }169 return true;170 }171 private function createGitTag($tag)172 {173 try174 {175 $this->git->createTag($tag);176 }177 catch (\exception $exception)178 {179 $this->writeError($exception->getMessage());180 $this->git->resetHardTo('HEAD~1');181 return false;182 }183 return true;184 }185 private function tagDevelopmentVersion($tag)186 {187 $this->tagSrcWith($tag);188 try189 {190 $this->git->addAllAndCommit('Set version to ' . $tag . '.');191 }192 catch (\exception $exception)193 {194 $this->writeError($exception->getMessage());195 $this->git->resetHardTo('HEAD~1');196 return false;197 }198 return true;199 }...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Execute automation tests with tagDevelopmentVersion on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.
Test now for FreeGet 100 minutes of automation test minutes FREE!!