Update pake build to keep the composer.json in sync with the git tag and the selfupdate version

This commit is contained in:
Craig Davis
2014-01-12 16:14:37 -07:00
parent 6c70c5b8e1
commit 44f3649809
5 changed files with 28 additions and 24 deletions

View File

@@ -45,8 +45,14 @@ function run_version() {
}
function run_version_file() {
// Find the latest tag
$version = trim(shell_exec('git describe --abbrev=0 --tags'));
// Write it to the version file for the self update command
file_put_contents('./version', $version);
// Write it to the composer.json file as well
$config = json_decode(file_get_contents('composer.json'));
$config->version = $version;
file_put_contents('composer.json', json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
}
function run_lint() {