Added task to set plugin version

This commit is contained in:
Andrey Savchenko committed 2015-06-11 17:23:31 +03:00
1 parent 7dfea751f5
commit 8e441c935f
1 file changed
+14 -1
+14 -1
View File
@@ -76,4 +76,17 @@ class RoboFile extends \Robo\Tasks {
);
$mustache->loadTemplate( 'laps' );
}
}
}
/**
* 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();
}
}