jenkins-bot has submitted this change and it was merged.
Change subject: Normalize line endings
......................................................................
Normalize line endings
Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
---
M melange/BundleCreater.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/melange/BundleCreater.php b/melange/BundleCreater.php
index 7297ec9..dc75039 100644
--- a/melange/BundleCreater.php
+++ b/melange/BundleCreater.php
@@ -202,7 +202,11 @@
exec( "git rm .gitreview --quiet --ignore-unmatch" );
$notefile = $this->dir . "/notes/$version-$ext";
- $contents = file_get_contents( $notefile );
+
+ // Sometimes these files pass through other editors,
+ // which save them with wrong file endings.
+ // Convert all endings to \n.
+ $contents = str_replace( array( "\r\n", "\r" ), "\n",
file_get_contents( $notefile ) );
preg_match( '/^#---$(.*)^#---$/msU', $contents,
$matches );
$notes = trim( $matches[1] );
$notes = "== $ext $version ==\nReleased at
$date.\n\n$notes\n";
--
To view, visit https://gerrit.wikimedia.org/r/56383
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If29c536a26181aacc7c957a7f7112593fc574121
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits