20after4 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/287565

Change subject: generate extension-list when making a new branch
......................................................................

generate extension-list when making a new branch

Change-Id: I83601247759ac3b87a922285ed790be520b70e4c
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index 7c7c6fa..9f6bc40 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -215,6 +215,8 @@
                        $this->runCmd( 'git', 'pull', '-q', '--ff-only', 
'origin', $oldVersion );
                }
 
+    $extension_list = [];
+
                # Create a new branch from master and switch to it
                $newVersion = $this->branchPrefix . $this->newVersion;
                $this->runCmd( 'git', 'checkout', '-q', '-b', $newVersion );
@@ -236,14 +238,26 @@
 
                        $this->runCmd( 'git', 'submodule', 'add', '-b', 
$submoduleBranch, '-q',
                                "{$this->repoPath}/extensions/{$name}.git", 
"extensions/$name" );
+
+      if (file_exists("extensions/{$name}/extension.json")) {
+        $extension_list[] = "\$IP/extensions/{$name}/extension.json";
+      } else if (file_exists("extensions/{$name}/{$name}.php")) {
+        $extension_list[] = "\$IP/extensions/{$name}/{$name}.php";
+      }
+      $extension_list[] = $extension;
                }
 
                # Add skin submodules
                foreach ( $this->branchedSkins as $name ) {
                        $this->runCmd( 'git', 'submodule', 'add', '-f', '-b', 
$newVersion, '-q',
                                "{$this->repoPath}/skins/{$name}.git", 
"skins/$name" );
+
+      $extension_list[] = "\$IP/skins/{$name}.json";
                }
 
+    # shell_exec('git submodule foreach -q echo \$IP/$path/$(ls extension.json 
|| ls skin.json || ls `basename $name.php`) 2>/dev/null');
+    file_put_contents('extension-list', join("\n", $extension_list));
+
                # Add vendor submodule
                $this->runCmd( 'git', 'submodule', 'add', '-f', '-b', 
$newVersion, '-q',
                        "{$this->repoPath}/vendor.git", 'vendor' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83601247759ac3b87a922285ed790be520b70e4c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: 20after4 <mmod...@wikimedia.org>

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

Reply via email to