From dbaafb65330440d0b5909720f36049281bba692f Mon Sep 17 00:00:00 2001 From: Dane Powell Date: Mon, 13 Mar 2023 11:34:15 -0700 Subject: [PATCH] Remove cache_dir --- factory-hooks/db-update/db-update.sh | 10 +--------- factory-hooks/post-site-install/post-site-install.sh | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/factory-hooks/db-update/db-update.sh b/factory-hooks/db-update/db-update.sh index d3265ba..bda1ffe 100755 --- a/factory-hooks/db-update/db-update.sh +++ b/factory-hooks/db-update/db-update.sh @@ -33,23 +33,15 @@ IFS='.' read -a name <<< "${uri}" # BLT executable: blt="/mnt/www/html/$sitegroup.$env/vendor/acquia/blt/bin/blt" -# Create and set Drush cache to unique local temporary storage per site. -# This approach isolates drush processes to completely avoid race conditions -# that persist after initial attempts at addressing in BLT: https://github.com/acquia/blt/pull/2922 -cache_dir=`/usr/bin/env php /mnt/www/html/$sitegroup.$env/vendor/acquia/blt/scripts/blt/drush/cache.php $sitegroup $env $uri` - -echo "Generated temporary drush cache directory: $cache_dir." - echo "Running BLT deploy tasks on $uri domain in $env environment on the $sitegroup subscription." # Run blt drupal:update tasks. The trailing slash behind the domain works # around a bug in Drush < 9.6 for path based domains: "domain.com/subpath/" is # considered a valid URI but "domain.com/subpath" is not. -DRUSH_PATHS_CACHE_DIRECTORY="$cache_dir" $blt drupal:update --environment=$env --site=${name[0]} --define drush.uri=$domain/ --verbose --no-interaction +$blt drupal:update --environment=$env --site=${name[0]} --define drush.uri=$domain/ --verbose --no-interaction # Clean up the drush cache directory. echo "Removing temporary drush cache files." -rm -rf "$cache_dir" set +v diff --git a/factory-hooks/post-site-install/post-site-install.sh b/factory-hooks/post-site-install/post-site-install.sh index 70ced87..9a551d3 100755 --- a/factory-hooks/post-site-install/post-site-install.sh +++ b/factory-hooks/post-site-install/post-site-install.sh @@ -29,18 +29,10 @@ IFS='.' read -a name <<< $internal_domain # BLT executable: blt="/mnt/www/html/$sitegroup.$env/vendor/acquia/blt/bin/blt" -# Create and set Drush cache to unique local temporary storage per site. -# This approach isolates drush processes to completely avoid race conditions -# that persist after initial attempts at addressing in BLT: https://github.com/acquia/blt/pull/2922 -cache_dir=`/usr/bin/env php /mnt/www/html/$sitegroup.$env/vendor/acquia/blt/scripts/blt/drush/cache.php $sitegroup $env $internal_domain` - # Execute the updates. -DRUSH_PATHS_CACHE_DIRECTORY="$cache_dir" $blt drupal:update --environment=$env --site=${name[0]} --define drush.uri=$internal_domain --verbose --no-interaction +$blt drupal:update --environment=$env --site=${name[0]} --define drush.uri=$internal_domain --verbose --no-interaction result=$? -# Clean up the drush cache directory. -rm -rf "$cache_dir" - set +v # Exit with the status of the BLT commmand. If the exit status is non-zero,