diff --git a/RoboFile.php b/RoboFile.php index 2f30ef0..0815b83 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -76,4 +76,17 @@ class RoboFile extends \Robo\Tasks { ); $mustache->loadTemplate( 'laps' ); } -} \ No newline at end of file +} + /** + * Sets the plugin version in header. + * + * @param string $version Version string. + */ + public function versionSet( $version ) { + + $this->taskReplaceInFile( 'laps.php' ) + ->regex( '|^Version:.*$|m' ) + ->to( 'Version: ' . $version ) + ->run(); + } +}