Skip to content

Commit

Permalink
Scrubbed workaround introduced in #72 to resolve issue affecting 2.1.…
Browse files Browse the repository at this point in the history
…3 and through 2.2.2 or possible up to but not including 2.3.0

Indicator of being fixed in 2.2.2 and later: magento/magento2#10673 (comment)

Indicator of it being fixed in 2.3.0 and later: magento/magento2#10913

Related to magento/magento2#7862 which is now closed as resolved in 2.2.x somewhere
  • Loading branch information
davidalger committed May 29, 2020
1 parent 3ca4d98 commit 6263cfb
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lib/capistrano/tasks/magento.rake
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ namespace :magento do
with mage_mode: :production do
_magento_version = magento_version

deploy_languages = fetch(:magento_deploy_languages).join(' ')
deploy_themes = fetch(:magento_deploy_themes)
deploy_jobs = fetch(:magento_deploy_jobs)

Expand All @@ -354,14 +355,6 @@ namespace :magento do
deploy_jobs = nil
end

# Workaround core-bug with multi-lingual deployments on Magento 2.1.3 and greater. In these versions each
# language must be iterated individually. See issue #72 for details.
if _magento_version >= Gem::Version.new('2.1.3')
deploy_languages = fetch(:magento_deploy_languages)
else
deploy_languages = [fetch(:magento_deploy_languages).join(' ')]
end

# Magento 2.2 introduced static content compilation strategies that can be one of the following:
# quick (default), standard (like previous versions) or compact
compilation_strategy = fetch(:magento_deploy_strategy)
Expand All @@ -375,10 +368,7 @@ namespace :magento do
# Magento 2.1 will fail to deploy if this file does not exist and static asset signing is enabled
execute :touch, "#{release_path}/pub/static/deployed_version.txt"

# This loop exists to support deploy on versions where each language must be deployed seperately
deploy_languages.each do |lang|
static_content_deploy "#{compilation_strategy}#{deploy_jobs}#{lang}#{deploy_themes}"
end
static_content_deploy "#{compilation_strategy}#{deploy_jobs}#{deploy_languages}#{deploy_themes}"
end

# Set the deployed_version of static content to ensure it matches across all hosts
Expand Down

0 comments on commit 6263cfb

Please sign in to comment.