Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Remove cache_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Mar 13, 2023
1 parent e8f852e commit dbaafb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
10 changes: 1 addition & 9 deletions factory-hooks/db-update/db-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 1 addition & 9 deletions factory-hooks/post-site-install/post-site-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dbaafb6

Please sign in to comment.