Skip to content

Commit

Permalink
move the messaging about the theme not being in the list up to that c…
Browse files Browse the repository at this point in the history
…heck

we can also remove the conditional around activation because if it's in the list, we should be able to activate it
  • Loading branch information
jazzsequence committed Jun 26, 2024
1 parent 218e6fe commit aff12de
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions private/scripts/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -486,21 +486,17 @@ function clean_up() {

if ! echo "$themelist" | grep -q "$sagename"; then
echo "${red}Theme $sagename not found in the theme list. Exiting here.${normal}"
echo "$themelist"
exit 1;
fi

# Activate the new theme
echo "${yellow}Activating the ${sagename} theme.${normal}"
if ! terminus wp -- "$sitename"."$siteenv" theme activate "$sagename"; then
terminus wp -- "$sitename"."$siteenv" theme list
echo "${red}Theme activation failed. Exiting here.${normal}"
echo "Check the theme list above. If the theme you created is not listed, it's possible that the deploy has not completed. You can try again in a few minutes using the following command:"
echo "terminus wp -- $sitename.dev theme activate $sagename"
echo "Once you do this, you will need to open the site to generate the requisite files and then commit them in SFTP mode."
exit 1;
fi

# Activate the new theme
echo "${yellow}Activating the ${sagename} theme.${normal}"
terminus wp -- "$sitename"."$siteenv" theme activate "$sagename"

# If this is a CI environment, stop here.
if [ "$is_ci" == 1 ]; then
echo "${yellow}CI detected. All done here.${normal} 🍵"
Expand Down

0 comments on commit aff12de

Please sign in to comment.