-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
improve bump script #3368
base: 5.2-dev
Are you sure you want to change the base?
improve bump script #3368
Conversation
|
||
if ($updated) { | ||
file_put_contents($filePath, $contents); | ||
echo "Copyright updated: $filePath" . PHP_EOL; |
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.
I'm not sure whether its worth writing out any change? Maybe its worth adding an "-v" option to show such logging but ignore it in most cases?
$updated = true; | ||
} | ||
|
||
if (preg_match('#2008\s+-\s+[0-9]{4}\s+J\!German#', $contents)) { |
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.
Please help me but to me it looks like we will always go into this right? Is is possible somehow to check whether that year is != the current year first?
$relativePath = str_replace($rootPath, '', $filePath); | ||
|
||
// Skip excluded files and directories | ||
if (preg_match('#\.(png|jpeg|jpg|gif|bmp|ico|webp|svg|woff|woff2|ttf|eot)$#', $filePath) || in_array($relativePath, $excludeFiles)) { |
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.
I do get the idea here but wouldn't it be easier to list only the extensions to include rather than the extensions to exclude?
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 was taken from the original, but of course it should be adapted!
Left comments looks good on a local test beyond that, but I think we should check that copyright and exclude/include extension thing. |
Zusammenfassung der Änderungen
First there was just the idea of passing the date with the -d option. And then after a few iterations, this came out.
Please test this locally and give me feedback.