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 Add brackets #49

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MS_GITHUB_TOKEN=abc123 php run.php update --cms-major=5 --branch=next-minor --dr
| --exclude=[modules] | Exclude the specified modules (without account prefix) separated by commas e.g. `silverstripe-mfa,silverstripe-totp` |
| --dry-run | Do not push to github or create pull-requests |
| --account | GitHub account to use for creating pull-requests (default: creative-commoners) |
| --no-delete | Do not delete `_data` and `modules` directories before running |
| --no-delete | Do not delete `_data` and `_modules` directories before running |
GuySartorelli marked this conversation as resolved.
Show resolved Hide resolved
| --update-prs | Update existing open PRs instead of creating new PRs |

**Note** that using `--branch=github-default` will only run scripts in the `scripts/default-branch` directory.
Expand Down
4 changes: 2 additions & 2 deletions funcs_scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function module_is_recipe()
error("Could not parse from composer.json - last error was $lastError");
}

return $json->type ?? '' === 'silverstripe-recipe';
return ($json->type ?? '') === 'silverstripe-recipe';
}

/**
Expand Down Expand Up @@ -190,7 +190,7 @@ function is_composer_plugin()
error("Could not parse from composer.json - last error was $lastError");
}

return $json->type ?? '' === 'composer-plugin';
return ($json->type ?? '') === 'composer-plugin';
}

/**
Expand Down
2 changes: 2 additions & 0 deletions funcs_utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function write_file($path, $contents)

/**
* Returns a list of all scripts files to run against a particular cms major version
* Scripts will be alphabetically sorted
*/
function script_files($cmsMajor)
{
Expand Down Expand Up @@ -78,6 +79,7 @@ function script_files($cmsMajor)
}
closedir($handle);
}
sort($scriptFiles);
return $scriptFiles;
}

Expand Down
Loading