12345678910111213141516171819202122232425262728293031 |
- <?php
- $version = 2015041400;
- $composerJson = file_get_contents(dirname(__FILE__) . "/composer.json");
- if ($composerJson === false) {
- throw new Exception("Unable to read composer.json file!");
- }
- $composer = json_decode($composerJson);
- if ($composer === null) {
- throw new Exception("JSON parse error while reading composer.json!");
- }
- if (!isset($composer->version)) {
- throw new Exception("Version field must be set in composer.json!");
- }
- $release = $composer->version;
|