Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Tinebase/Core): make (RELEASE) buildtype work again
Browse files Browse the repository at this point in the history
... default 'DEVELOPMENT' is replaced during build

fixes #7118
#7118

Change-Id: I3ba6b4d88af1701dc7ceee7fd69abf05ef0895e8
Reviewed-on: http://gerrit.tine20.com/customers/15087
Tested-by: Jenkins CI (http://ci.tine20.com/) <tine20-jenkins@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
  • Loading branch information
pschuele committed Dec 20, 2019
1 parent 23cfc71 commit 7a368f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
14 changes: 9 additions & 5 deletions tine20/Tinebase/Config.php
Expand Up @@ -776,15 +776,19 @@ class Tinebase_Config extends Tinebase_Config_Abstract
'setByAdminModule' => TRUE,
'setBySetupModule' => TRUE,
),
/**
* TODO add AUTODETECT (check for webpack-asset.json -> RELEASE)
*/
self::BUILD_TYPE => array(
//_('Build Type')
'label' => 'Build Type',
'label' => 'Build Type',
//_('One of: DEBUG, DEVELOPMENT, RELEASE')
'description' => 'One of: DEBUG, DEVELOPMENT, RELEASE',
'type' => 'string',
'description' => 'One of: DEBUG, DEVELOPMENT, RELEASE',
'type' => 'string',
'clientRegistryInclude' => false,
'setByAdminModule' => false,
'setBySetupModule' => false,
'setByAdminModule' => false,
'setBySetupModule' => false,
'default' => 'DEVELOPMENT',
),
/**
* for example: 'de'
Expand Down
8 changes: 1 addition & 7 deletions tine20/Tinebase/Core.php
Expand Up @@ -649,13 +649,7 @@ public static function setupBuildConstants()
return;
}
$config = self::getConfig();

// allow to overwrite buildtype via Tinebase/config.inc.php
$buildType = $config->get(Tinebase_Config::BUILD_TYPE);
if (! $buildType) {
$buildType = 'DEVELOPMENT';
}
define('TINE20_BUILDTYPE', strtoupper($buildType));
define('TINE20_BUILDTYPE', strtoupper($config->get(Tinebase_Config::BUILD_TYPE)));
define('TINE20_CODENAME', Tinebase_Helper::getDevelopmentRevision());
define('TINE20_PACKAGESTRING', 'none');
define('TINE20_RELEASETIME', 'none');
Expand Down

0 comments on commit 7a368f8

Please sign in to comment.