Merge pull request #56 from radiorabe/feature/version-reporting
Harmonize version reporting in ui and api
This commit is contained in:
commit
ff83784864
8 changed files with 23 additions and 31 deletions
|
@ -96,7 +96,6 @@ class Config {
|
|||
$CC_CONFIG['facebook-app-api-key'] = $globalAirtimeConfigValues['facebook']['facebook_app_api_key'];
|
||||
}
|
||||
|
||||
|
||||
if(isset($values['demo']['demo'])){
|
||||
$CC_CONFIG['demo'] = $values['demo']['demo'];
|
||||
}
|
||||
|
@ -104,10 +103,12 @@ class Config {
|
|||
}
|
||||
|
||||
public static function setAirtimeVersion() {
|
||||
$airtime_version = Application_Model_Preference::GetAirtimeVersion();
|
||||
$uniqueid = Application_Model_Preference::GetUniqueId();
|
||||
$buildVersion = @file_get_contents(self::$rootDir."/../VERSION");
|
||||
self::$CC_CONFIG['airtime_version'] = md5($airtime_version.$buildVersion);
|
||||
$version = @file_get_contents(self::$rootDir."/../VERSION");
|
||||
if (!$version) {
|
||||
// fallback to constant from constants.php if no other info is available
|
||||
$version = LIBRETIME_MAJOR_VERSION;
|
||||
}
|
||||
self::$CC_CONFIG['airtime_version'] = trim($version);
|
||||
}
|
||||
|
||||
public static function getConfig() {
|
||||
|
|
|
@ -32,8 +32,8 @@ define('LICENSE_URL' , 'http://www.gnu.org/licenses/agpl-3.0-standalone.h
|
|||
define('AIRTIME_COPYRIGHT_DATE' , '2010-2015');
|
||||
define('AIRTIME_REST_VERSION' , '1.1');
|
||||
define('AIRTIME_API_VERSION' , '1.1');
|
||||
// XXX: it's important that we upgrade this every time we add an upgrade!
|
||||
define('AIRTIME_CODE_VERSION' , '2.5.16');
|
||||
// XXX: it's important that we upgrade this on major version bumps, usually users get more exact info from VERSION in airtime root dir
|
||||
define('LIBRETIME_MAJOR_VERSION', '3');
|
||||
|
||||
// grab values from env (i'll do this everywhere with a small function if we like it)
|
||||
define('LIBRETIME_CONF_DIR', getenv('LIBRETIME_CONF_DIR') ? getenv('LIBRETIME_CONF_DIR') : '/etc/airtime');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue