Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Don't set up database etc if not needed #98

Merged

Conversation

GuySartorelli
Copy link
Member


if [[ NEEDS_FULL_SETUP == "false" ]]; then
echo "skipping .env, database, and other full site setup steps"
exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of existing which may mess up the rest of the job, just move the block of code inside the conditional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# composer install does actually remove the artifact directory
mkdir artifacts

if [[ NEEDS_FULL_SETUP == "false" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [[ NEEDS_FULL_SETUP == "false" ]]; then
if [[ $NEEDS_FULL_SETUP == 'false' ]]; then

Need a $ for the variable :-)

Using single quotes just to copy style above where a conditional check was done if [[ $SUCCESSFULLY_REQUIRED == 'false' ]]; then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The single/double quotes isn't consistent everywhere in this file (I copied double quotes from somewhere in here too) but I have no issues with that change.

Done.

@emteknetnz
Copy link
Member

emteknetnz commented Jan 29, 2024

@GuySartorelli Once this has auto-tagged could you manually re-trigger a recipe + a regular module + something without installer just to double check things still work as expected

@emteknetnz emteknetnz merged commit e2d97b5 into silverstripe:1.5 Jan 29, 2024
4 checks passed
@emteknetnz emteknetnz deleted the pulls/1.5/no-db-unless-needed branch January 29, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants