rebuild_profile.sh 1014 Bytes
Newer Older
1
build_option=${1}
2
3
4
drupal_root_dir=${2-/var/www/drupal8}
gesso_branch_tag=${3-8.x-3.x}
gesso_root_dir=${4-8.x-3.x}
5
6
7

echo "Starting rebuild of the profile..."

8
9
10
11
# 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.

12
echo "Deleting the composer.lock file..."
13
rm --force composer.lock
14

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

21
echo "Clearing the composer cache..."
22
composer clear-cache
23
echo "Done clearing the composer cache..."
24

25
26
27
28
29
echo "Running composer install..."
composer install --no-interaction
echo ""
echo "Done rebuilding profile."
echo ""
Eric Bremner's avatar
Eric Bremner committed
30
31

if [ ${build_option} = 2 ]; then
32
  sh ./scripts/build_gesso_devel.sh $drupal_root_dir $gesso_branch_tag $gesso_root_dir
Eric Bremner's avatar
Eric Bremner committed
33
34
fi

Eric Bremner's avatar
Eric Bremner committed
35
if [ ${build_option} = 3 ] || [ ${build_option} = 3 ]; then
Eric Bremner's avatar
Eric Bremner committed
36
  sh ./scripts/rebuild_gesso.sh $gesso_branch_tag
Liam Morland's avatar
Liam Morland committed
37
fi