diff --git a/VERSION b/VERSION deleted file mode 100644 index b7fd8620d..000000000 --- a/VERSION +++ /dev/null @@ -1,2 +0,0 @@ -PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.5.3 diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php index 6af950882..d38a03797 100644 --- a/airtime_mvc/application/configs/conf.php +++ b/airtime_mvc/application/configs/conf.php @@ -8,14 +8,17 @@ class Config { private static $CC_CONFIG = null; + private static $rootDir; public static function loadConfig() { + + self::$rootDir = __DIR__."/../.."; $CC_CONFIG = array( /* ================================================ storage configuration */ 'soundcloud-client-id' => '2CLCxcSXYzx7QhhPVHN4A', 'soundcloud-client-secret' => 'pZ7beWmF06epXLHVUP1ufOg2oEnIt9XhE8l8xt0bBs', - "rootDir" => __DIR__."/../.." + "rootDir" => self::$rootDir ); //In the unit testing environment, we always want to use our local airtime.conf in airtime_mvc/application/test: @@ -89,7 +92,8 @@ class Config { public static function setAirtimeVersion() { $airtime_version = Application_Model_Preference::GetAirtimeVersion(); $uniqueid = Application_Model_Preference::GetUniqueId(); - self::$CC_CONFIG['airtime_version'] = md5($airtime_version.$uniqueid); + $buildVersion = file_get_contents(self::$rootDir."/../VERSION"); + self::$CC_CONFIG['airtime_version'] = md5($airtime_version.$buildVersion); } public static function getConfig() { diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..0a16dcdab --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +composer install + +git rev-parse HEAD > VERSION +