Added version getter to robo file

This commit is contained in:
Andrey Savchenko committed 2015-06-12 21:05:50 +03:00
1 parent 2289923666
commit cf44efbe64
1 file changed
+15 -1
+15 -1
View File
@@ -76,7 +76,21 @@ class RoboFile extends \Robo\Tasks {
);
$mustache->loadTemplate( 'laps' );
}
}
/**
* @return string
*/
private function versionGet() {
$content = file_get_contents( __DIR__ . '/laps.php' );
if ( false !== preg_match( '|^Version: (?P<version>.+)$|m', $content, $matches ) ) {
return trim( $matches['version'] );
}
return '';
}
/**
* Sets the plugin version in header.
*