File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,16 +169,7 @@ export MAGENTO_ENABLE_CONFIG_WEBSERVICE_CACHE
169169MAGENTO_ENABLE_TARGET_RULE_CACHE=$( convert_to_boolean_string " ${MAGENTO_ENABLE_TARGET_RULE_CACHE:- true} " )
170170export MAGENTO_ENABLE_TARGET_RULE_CACHE
171171
172- function detect_enterprise_edition() (
173- set +e
174- source /usr/local/share/php/common_functions.sh
175- if has_composer_package " magento/product-enterprise-edition" ; then
176- echo ' true'
177- else
178- echo ' false'
179- fi
180- )
181- MAGENTO_ENTERPRISE_EDITION=$( convert_to_boolean_string " ${MAGENTO_ENTERPRISE_EDITION:- $(detect_enterprise_edition)} " )
172+ MAGENTO_ENTERPRISE_EDITION=$( convert_to_boolean_string " ${MAGENTO_ENTERPRISE_EDITION:- $(run_return_boolean has_composer_package " magento/product-enterprise-edition" )} " )
182173export MAGENTO_ENTERPRISE_EDITION
183174
184- export MAGENTO_VERSION=" ${MAGENTO_VERSION:- 2.1 } "
175+ export MAGENTO_VERSION=" ${MAGENTO_VERSION:- $(composer_package_version magento / product-community-edition | cut -d. -f1,2) } "
Original file line number Diff line number Diff line change @@ -408,10 +408,15 @@ function do_magento_download_magerun2() {
408408 chmod +x /app/bin/n98-magerun2.phar
409409}
410410
411- function do_magento2_templating() {
412- if [ " $MAGENTO_VERSION " != " 2.0" ] && [ " $MAGENTO_VERSION " != " 2.1" ]; then
411+ function remove_config_template() (
412+ set +e
413+ if dpkg --compare-versions " $MAGENTO_VERSION " ge 2.2; then
413414 rm -f /etc/confd/conf.d/magento_config.php.toml /etc/confd/templates/magento/config.php.tmpl
414415 fi
416+ )
417+
418+ function do_magento2_templating() {
419+ remove_config_template
415420
416421 mkdir -p /app/app/etc/
417422 chown -R " ${CODE_OWNER} :${CODE_GROUP} " /app/app/
You can’t perform that action at this time.
0 commit comments