-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.php
30 lines (26 loc) · 823 Bytes
/
version.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/**
* Elgg version number.
* This file defines the current version of the core Elgg code being used.
* This is compared against the values stored in the database to determine
* whether upgrades should be performed.
*
* @package Elgg
* @subpackage Core
*/
// YYYYMMDD = Elgg Date
// XX = Interim incrementer
$version = 2015062900;
$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!");
}
// Human-friendly version name
if (!isset($composer->version)) {
throw new Exception("Version field must be set in composer.json!");
}
$release = $composer->version;