扩展:扩展分配器
ExtensionDistributor 发行状态: 稳定版 |
|
---|---|
实现 | 特殊页面 |
描述 | 启用来自www.mediawiki.org的扩展分配 |
作者 | Tim Starling, Sam Reed, Chad Horohoe |
最新版本 | 持续更新 |
兼容性政策 | 快照跟随MediaWiki发布。 master分支不向后兼容。 |
MediaWiki | 1.26+ |
数据库更改 | 否 |
许可协议 | GNU通用公眾授權條款2.0或更新版本 |
下載 | |
|
|
季度下載量 | 31 (Ranked 106th) |
前往translatewiki.net翻譯ExtensionDistributor扩展 | |
問題 | 开启的任务 · 报告错误 |
The ExtensionDistributor extension generates .tar.gz snapshots of extensions in the git repository and distributes them. It is intended for use on www.mediawiki.org. 参见Special:ExtensionDistributor以了解它如何工作。
安裝
- 下载文件,并将解压后的
ExtensionDistributor
文件夹移动到extensions/
目录中。
开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExtensionDistributor - 将下列代码放置在您的LocalSettings.php 的底部:
wfLoadExtension( 'ExtensionDistributor' );
- 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。
配置设置:
/**
* Configuration for the API client to use
*
* Must have a 'class' key, can either be
* "GithubExtDistProvider" or "GerritExtDistProvider"
*
* Common parameters:
* 'apiUrl' - API url to use with $EXT and $REF variables
* 'tarballUrl' - API url where tarballs are located
* 'tarballName' - Expected filename of tarballs
* 'proxy' - Proxy to use (optional)
*
* Github specific parameters:
* 'token' - An OAuth token for authenticating requests
*
* Gerrit specific parameters:
* 'repoListUrl' - API url to fetch a list of repositories
*
* @var array
*/
$wgExtDistAPIConfig = false;
/**
* File to fetch list of extensions from, with one extension per line
* Only needed for the Github provider
* Example url: https://gerrit.wikimedia.org/mediawiki-extensions.txt
*/
$wgExtDistListFile = false;
/**
* Supported branches/tags, master is the default (and shouldn't be removed)
*/
$wgExtDistSnapshotRefs = array(
'master',
);
/**
* Snapshot branch/tag to default to
*/
$wgExtDistDefaultSnapshot = 'master';
You'll need to set up some configuration for the extension to work. For Wikimedia's Gerrit instance, it would look like:
$wgExtDistAPIConfig = array(
'class' => \MediaWiki\Extension\ExtensionDistributor\Providers\GerritExtDistProvider::class,
'apiUrl' => 'https://gerrit.wikimedia.org/r/projects/mediawiki%2F$TYPE%2F$EXT/branches',
'tarballUrl' => 'https://extdist.wmflabs.org/dist/$TYPE/$EXT-$REF-$SHA.tar.gz',
'tarballName' => '$EXT-$REF-$SHA.tar.gz',
'repoListUrl' => 'https://gerrit.wikimedia.org/r/projects/?p=mediawiki/$TYPE/',
);
$wgExtDistSnapshotRefs = array(
'master',
'REL1_25',
);
The Gerrit provider requires an independent tarball generator, the source code for the one running at extdist.wmflabs.org can be found: https://github.com/wikimedia/labs-tools-extdist
此扩展用于一个或多个维基媒体项目。 这可能意味着扩展足够稳定、运作足够良好,可以用在这样的高流量的网站上。 请在维基媒体的CommonSettings.php和InitialiseSettings.php配置文件中查找此扩展的名称以查看哪些网站安装了该扩展。 特定wiki上的已安装的扩展的完整列表位于Special:Version页面。 |