Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397975 )

Change subject: Fix typo from previous commit, and clean up branching logic
......................................................................

Fix typo from previous commit, and clean up branching logic

- Remove pre-semver support
- De-anchor the version detection from ^wmf so if we're given a
  remote like origin/wmf it'll work

Change-Id: I76fa903eb4f41722248367352c4b47a64de3ce7e
---
M make-deploy-notes/uploadChangelog.php
1 file changed, 4 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/75/397975/1

diff --git a/make-deploy-notes/uploadChangelog.php 
b/make-deploy-notes/uploadChangelog.php
index ce45e7b..ca3283c 100644
--- a/make-deploy-notes/uploadChangelog.php
+++ b/make-deploy-notes/uploadChangelog.php
@@ -29,7 +29,7 @@
 $previousVersion = getPreviousVersion( $version );
 
 if ( $previousVersion === null ) {
-    print "Unable to determine prior branch, given $version as current\n"
+    print "Unable to determine prior branch, given $version as current\n";
     exit( 1 );
 }
 
@@ -88,14 +88,8 @@
  * @return string
  */
 function getPreviousMinorVersion( $major ) {
-       // check, which filter should be used for the filter
-       // Note, that 27 is used here, because the previous version would be 26,
-       // which uses the old non semantic versioning notation.
-       if ( $major <= 27 ) {
-               $filter = "wmf/1.{$major}wmf";
-       } else {
-               $filter = "wmf/1.{$major}.0-wmf";
-       }
+       $filter = "wmf/1.{$major}.0-wmf";
+
        // get the list in a raw output format which would be visible in the
        // console for this command, sorted by version numbers
        $rawList = shell_exec( "git branch -a --list */{$filter}* | sort -V" );
@@ -125,7 +119,7 @@
 function getMajorMinor( $input ) {
        $matches = array();
        // match any version like wmf/1.26wmf22 or the new semver 
wmf/1.27.0-wmf1
-       if ( preg_match( "/^wmf\/1\.(\d{2})(?:\.[0-9]\-)?wmf\.?(\d{1,2})/", 
$input, $matches ) ) {
+       if ( preg_match( "/wmf\/1\.(\d{2})\.[0-9]\-wmf\.(\d{1,2})/", $input, 
$matches ) ) {
                // var_dump( $matches );
                $major = intval( $matches[1] );
                $minor = intval( $matches[2] );

-- 
To view, visit https://gerrit.wikimedia.org/r/397975
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76fa903eb4f41722248367352c4b47a64de3ce7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to