rebuild_profile.sh 1.41 KB
Newer Older
1
2
3
4
5
drupal_core_path=${1:-/var/www/drupal8}
pattern_lab_root_path=${2:-/var/www/html}

echo "Starting rebuild of the profile..."

6
7
8
9
# To ensure a complete rebuild, we need to delete everything and
# reinstall. Using "composer update" will not always update modules
# referenced by branch instead of tag.

10
echo "Deleting the composer.lock file..."
11
rm --force composer.lock
12

13
14
15
16
echo "Removing the existing modules, themes, and libraries directories..."
rm -rf modules/
rm -rf themes/
rm -rf libraries/
17
18
19
20
21
22
echo "Existing things deleted."

echo "Clearing the composer cache..."
composer clear-cache

echo "Running composer install..."
23
24
25
26
27
composer install --no-interaction
echo ""
echo "Done rebuilding profile."
echo ""

28
echo "Running composer update..."
29
composer update --with-dependencies
30
echo ""
31
echo "Done updating profile."
32
33
34
35
36
37
38
echo ""

echo ""
echo "Running setuptheme..."
echo ""
cd themes/uw_fdsu_theme_resp/

39
echo "Re-add Adding symbolic links..."
40

41
ln --force --symbolic "$pattern_lab_root_path/uw_wcms_pattern_lab"
42
43
44

# Symbolic link need to components because the module Unified Twig Extensions
# needs to extend twig and can only read theme/*/_twig_component directories
45
ln --force --symbolic "$pattern_lab_root_path/uw_wcms_pattern_lab/components"
46
47

# Add symbolic link for the libraries folder so we can have it in our base profile instead
48
ln --no-dereference --force --symbolic /var/www/drupal8/profiles/uw_base_profile/libraries /var/www/drupal8/libraries