Commit 92c09862 authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch 'feature/ISTWCMS-4487-ebremner-new-scripts' into '8.x-3.x'

ISTWCMS-4487: Update rebuild scripts to use new uw_wcms_gesso location

See merge request !56
parents 5fe15e01 ff33ec43
......@@ -45,10 +45,10 @@ done
if [[ ! -z $use_help ]]; then
printf "./rebuild.sh will accept the following switches:\n"
printf "\n --build-option [#] (required)"
printf "\n 1 = rebuild profile only (non-development)"
printf "\n 2 = rebuild profile and gesso (for development)"
printf "\n 3 = rebuild gesso only (for development)"
printf "\n 4 = update gesso in theme (non-development)"
printf "\n 1 = rebuild profile only (for non-theme development)"
printf "\n 2 = rebuild profile and gesso (for theme development)"
printf "\n 3 = rebuild gesso only (for theme development)"
printf "\n 4 = rebuild profile only (for theme development)"
printf "\n"
printf "\n --build-type [#] (defaulted)"
printf "\n Provide a build before the script runs."
......@@ -96,10 +96,10 @@ if [ ${interactivity} == 1 ]; then
fi
# Ask install questions.
echo "What would you like to do?"
echo "1 = Rebuild profile (non-development)."
echo "2 = Rebuild profile and gesso (for development)."
echo "3 = Rebuild gesso (for development)."
echo "4 = Update gesso in theme (non-development)."
echo "1 = Rebuild profile only (for non-theme development)."
echo "2 = Rebuild profile and gesso (for theme development)."
echo "3 = Rebuild gesso only (for theme development)."
echo "4 = Rebuild profile only (for theme development)."
echo "[x] Exit and do nothing"
while ! [[ "$build_option" =~ ^(1|2|3|4|x)$ ]]
......@@ -128,7 +128,7 @@ if [ ${interactivity} == 1 ]; then
read -r gesso_branch_tag
fi
if [ ${build_option} == "2" ] || [ ${build_option} == "3" ]; then
if [ ${build_option} == "2" ] || [ ${build_option} == "3" ] || [ ${build_option} == "4" ]; then
printf "\nGesso root directory: [$gesso_root_default]: "
read -r gesso_root_dir
fi
......@@ -162,7 +162,7 @@ fi
case $build_option in
1 )
echo ""
echo "You have chosen to rebuild the profile (non-development).";
echo "You have chosen to rebuild profile only (for non-theme development).";
echo ""
if [[ $? -ne 0 ]] ; then
......@@ -173,7 +173,7 @@ case $build_option in
;;
2 )
echo ""
echo "You have chosen to rebuild the profile and gesso (for development).";
echo "You have chosen to rebuild profile and gesso (for theme development).";
echo ""
if [[ $? -ne 0 ]] ; then
......@@ -184,7 +184,7 @@ case $build_option in
;;
3 )
echo ""
echo "You have chosen to rebuild gesso only (for development)."
echo "You have chosen to rebuild gesso only (for theme development)."
echo ""
if [[ $? -ne 0 ]] ; then
......@@ -195,13 +195,13 @@ case $build_option in
;;
4 )
echo ""
echo "You have chosen to update gesso in theme (non-development).";
echo "You have chosen to rebuild profile only (for theme development).";
echo ""
if [[ $? -ne 0 ]] ; then
exit 1
else
sh ./scripts/get_gesso_files.sh $drupal_root_dir $gesso_tag_branch
sh ./scripts/rebuild_profile.sh $build_option $drupal_root_dir $gesso_branch_tag $gesso_root_dir
fi
;;
esac
......
......@@ -18,20 +18,8 @@ git checkout $gesso_branch_tag
sh build_gesso.sh
cd $drupal_root_dir/profiles/uw_base_profile/modules/features/uw_wcms_gesso
cd $drupal_root_dir
rm -rf source
cd "profiles/uw_base_profile"
rm -rf css
rm -rf js
rm -rf images
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/source" source
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/css" css
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/js" js
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/source/images" images
sh ./scripts/set_sym_links.sh $drupal_root_dir $gesso_root_dir
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -32,6 +32,10 @@ if [ ${build_option} = 2 ]; then
sh ./scripts/build_gesso_devel.sh $drupal_root_dir $gesso_branch_tag $gesso_root_dir
fi
if [ ${build_option} = 3 ] || [ ${build_option} = 3 ]; then
if [ ${build_option} = 3 ]; then
sh ./scripts/rebuild_gesso.sh $gesso_branch_tag
fi
if [ ${build_option} = 4 ]; then
sh ./scripts/set_sym_links.sh $drupal_root_dir $gesso_root_dir
fi
drupal_root_dir=${1-/var/www/drupal8}
gesso_root_dir=${2-/var/www/html}
cd $drupal_root_dir/profiles/uw_base_profile/modules/custom/uw_wcms_gesso
rm -rf source
rm -rf css
rm -rf js
rm -rf images
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/source" source
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/css" css
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/js" js
ln --force --symbolic "$gesso_root_dir/uw_wcms_gesso/source/images" images
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment