From 3c0ae866e0f84436bdd3ab8d1e68ca7a2f3bd665 Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Wed, 5 Jul 2017 21:45:27 +0300 Subject: [PATCH] Added Robo tag task and updated changelog for 1.4.4 Fixes #10 --- CHANGELOG.md | 8 ++++++++ RoboFile.php | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02eeef2..7500956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +## 1.4.4 - 2017-07-05 + +### Added +- Robo task to update header version and tag in Git + +### Fixed +- version in header + ## 1.4.3 - 2017-06-28 ### Fixed diff --git a/RoboFile.php b/RoboFile.php index 05d2a3d..1793fa6 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -77,6 +77,23 @@ class RoboFile extends \Robo\Tasks { $mustache->loadTemplate( 'laps' ); } + /** + * Updates version in header and makes git version tag. + * + * @param string $version Version string. + */ + public function tag( $version ) { + + $this->versionSet( $version ); + + $this->taskGitStack() + ->stopOnFail() + ->add( 'laps.php' ) + ->commit( "Updated header version to {$version}" ) + ->tag( $version ) + ->run(); + } + /** * Sets the plugin version in header. *