Replace the version hashing with git revision hashing to fix browser
caching
This commit is contained in:
parent
5a644ae0b8
commit
73cb14155c
3 changed files with 11 additions and 4 deletions
2
VERSION
2
VERSION
|
@ -1,2 +0,0 @@
|
|||
PRODUCT_ID=Airtime
|
||||
PRODUCT_RELEASE=2.5.3
|
|
@ -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() {
|
||||
|
|
5
build.sh
Executable file
5
build.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
composer install
|
||||
|
||||
git rev-parse HEAD > VERSION
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue