Skip to content

Commit

Permalink
Updating scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrichards committed Mar 19, 2018
1 parent 4681d92 commit c31f2b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/development/common.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Exit on failure
# set -e

REFERENCE_DUMP_FILE="assets/post-import.sql"
ASSETSDIR=assets
REFERENCE_DUMP_FILE="$ASSETSDIR/post-import.sql"
SCOPE=dev
ROOT=docroot
PROFILE=startup
Expand Down
10 changes: 5 additions & 5 deletions scripts/development/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ source $(dirname "$0")/common.inc.sh
clean

# Copy the settings.local.php to the default site if it doesn't exist already.
if [ ! -f "docroot/sites/default/settings.local.php" ]; then
run_command "Installing default config" "cp docroot/sites/default.settings.local.php docroot/sites/default/settings.local.php"
if [ ! -f "$ROOT/sites/default/settings.local.php" ]; then
run_command "Installing default config" "cp $ROOT/sites/default.settings.local.php $ROOT/sites/default/settings.local.php"
fi

run_command "Install Site." "./bin/drush site-install --account-pass=admin $PROFILE $DRUSH_GLOBALS -y"
run_command "Resetting the site UUID." "./bin/drush config-set system.site uuid $UUID $DRUSH_GLOBALS"
run_command "Clearing the cache." "./bin/drush cr -r $ROOT"
run_command "Creating reference database dump" "./bin/drush -r $ROOT sql-dump --result-file=../$ASSETSDIR/post-install.sql"
run_command "Resetting the site UUID." "./bin/drush config-set system.site uuid $UUID $DRUSH_GLOBALS -y"
run_command "Clearing the cache." "./bin/drush cr $DRUSH_GLOBALS"
run_command "Creating reference database dump" "./bin/drush $DRUSH_GLOBALS sql-dump --result-file=../$ASSETSDIR/post-install.sql"

echo "Setup complete."
8 changes: 4 additions & 4 deletions scripts/development/refresh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ if [[ ! $KEEPDB ]]; then
run_command "Restoring database" "./bin/drupal database:restore --file=../assets/post-install.sql"
fi
run_command "Composer install." "composer install"
run_command "Clearing caches." "./bin/drush cr -r $ROOT"
run_command "Clearing caches." "./bin/drush cr $DRUSH_GLOBALS"
run_command "Module sync." "./bin/drush module-sync --scope=$SCOPE $DRUSH_GLOBALS"
run_command "Importing configuration." "./bin/drush config-split:import $DRUSH_GLOBALS"
run_command "Updating database." "./bin/drush updatedb $DRUSH_GLOBALS"
run_command "Entity updates." "./bin/drush entup -r $ROOT"
run_command "Clearing caches." "./bin/drush cr -r $ROOT"
run_command "Updating database." "./bin/drush updatedb $DRUSH_GLOBALS -y"
run_command "Entity updates." "./bin/drush entup $DRUSH_GLOBALS"
run_command "Clearing caches." "./bin/drush cr $DRUSH_GLOBALS"

echo "Refresh complete."

0 comments on commit c31f2b0

Please sign in to comment.