-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
DEVELOPMENT_INSTALL is exported by site-specific-install. Choose the correct STAGING_SITE setting based on this variable.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,12 @@ RANDOM_EMAIL_SECRET=$(random_alphanumerics 32) | |
RANDOM_EMERGENCY_PASSWORD=$(random_alphanumerics 10) | ||
RANDOM_COOKIE_SECRET=$(random_alphanumerics 100) | ||
|
||
if [ $DEVELOPMENT_INSTALL = true ]; then | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
garethrees
Author
Member
|
||
STAGING_SITE="0" | ||
else | ||
STAGING_SITE="1" | ||
fi | ||
|
||
if ! [ -f config/general.yml ] | ||
then | ||
sed -r \ | ||
|
@@ -115,6 +121,7 @@ then | |
-e "s,^( *THEME_BRANCH:).*,\\1 'develop'," \ | ||
-e "s,^( *USE_MAILCATCHER_IN_DEVELOPMENT:).*,\\1 false," \ | ||
-e "s,^( *BUNDLE_PATH:).*,\\1 $HOME/bundle/," \ | ||
-e "s,^( *STAGING_SITE:).*,\\1 '$STAGING_SITE'," \ | ||
config/general.yml-example > config/general.yml | ||
fi | ||
|
||
|
2 comments
on commit 9c66a11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems reasonable (once the logic is fixed), but I think it needs a couple of other corresponding changes to keep things working as expected, and as documented. The installation script documentation says that this will install a site in development mode by default - I think we should update the instructions on that page so that they show the --development
flag being used, and then give instructions for what to do if you want to install in production mode. Our own instructions for updating the AMI also now need to be updated to pass the --development
flag, as the documentation for the AMI also says it runs in development mode by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, but wow that's confusing! Maybe this needs a bit more thought to ensure the script is suitable for a non-development install.
There are a few syntax issues here. $DEVELOPMENT_INSTALL isn't passed to this script, so isn't defined at this point. Also, this logic seems inverted - if we got the
DEVELOPMENT_INSTALL
flag, thenSTAGING_SITE
should be 1, not 0.