Added version getter to robo file
This commit is contained in:
1 parent
2289923666
commit
cf44efbe64
1 file changed
+15
-1
+15
-1
@@ -76,7 +76,21 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
);
|
);
|
||||||
$mustache->loadTemplate( 'laps' );
|
$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.
|
* Sets the plugin version in header.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in new issue
Block a user