File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -172,4 +172,4 @@ export MAGENTO_ENABLE_TARGET_RULE_CACHE
172
172
MAGENTO_ENTERPRISE_EDITION=$( convert_to_boolean_string " ${MAGENTO_ENTERPRISE_EDITION:- $(run_return_boolean has_composer_package " magento/product-enterprise-edition" )} " )
173
173
export MAGENTO_ENTERPRISE_EDITION
174
174
175
- export MAGENTO_VERSION=" ${MAGENTO_VERSION:- $(composer_package_version magento / product-community-edition | cut -d. -f1,2 )} "
175
+ export MAGENTO_VERSION=" ${MAGENTO_VERSION:- $(detect_magento_version )} "
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ function detect_magento_version() {
4
+ if has_composer_package magento/product-community-edition; then
5
+ composer_package_version magento/product-community-edition | cut -d. -f1,2
6
+ else
7
+ echo " 2.1"
8
+ fi
9
+ }
10
+
3
11
function do_composer_config() {
4
12
as_code_owner " composer global config repositories.magento composer https://repo.magento.com/"
5
13
@@ -408,12 +416,11 @@ function do_magento_download_magerun2() {
408
416
chmod +x /app/bin/n98-magerun2.phar
409
417
}
410
418
411
- function remove_config_template() (
412
- set +e
419
+ function remove_config_template() {
413
420
if dpkg --compare-versions " $MAGENTO_VERSION " ge 2.2; then
414
421
rm -f /etc/confd/conf.d/magento_config.php.toml /etc/confd/templates/magento/config.php.tmpl
415
422
fi
416
- )
423
+ }
417
424
418
425
function do_magento2_templating() {
419
426
remove_config_template
You can’t perform that action at this time.
0 commit comments