Skip to content

Commit 0461b38

Browse files
authored
Merge pull request #401 from continuouspipe/feature/support-magento-2.2-workflow
Avoid conflicting with Magento 2.2 workflow
2 parents 49453e2 + fd8b3e8 commit 0461b38

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

magento2/usr/local/share/env/30-framework

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,7 @@ export MAGENTO_ENABLE_CONFIG_WEBSERVICE_CACHE
169169
MAGENTO_ENABLE_TARGET_RULE_CACHE=$(convert_to_boolean_string "${MAGENTO_ENABLE_TARGET_RULE_CACHE:-true}")
170170
export 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")}")
182173
export MAGENTO_ENTERPRISE_EDITION
174+
175+
export MAGENTO_VERSION="${MAGENTO_VERSION:-$(composer_package_version magento/product-community-edition | cut -d. -f1,2)}"

magento2/usr/local/share/magento2/magento_functions.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,16 @@ function do_magento_download_magerun2() {
408408
chmod +x /app/bin/n98-magerun2.phar
409409
}
410410

411+
function remove_config_template() (
412+
set +e
413+
if dpkg --compare-versions "$MAGENTO_VERSION" ge 2.2; then
414+
rm -f /etc/confd/conf.d/magento_config.php.toml /etc/confd/templates/magento/config.php.tmpl
415+
fi
416+
)
417+
411418
function do_magento2_templating() {
419+
remove_config_template
420+
412421
mkdir -p /app/app/etc/
413422
chown -R "${CODE_OWNER}:${CODE_GROUP}" /app/app/
414423
}

0 commit comments

Comments
 (0)