Skip to content

mw dev mediawiki get-code

Releasev0.35.0 · cfeceb67

Watch it in action

Add and test a MediaWiki extension
mw dev mediawiki get-code [flags]

Can be used to retrieve code easily from Gerrit.

You can persist some configurable settings in the config.

Terminal window
mw config get gerrit.username
mw config set gerrit.username foo

New Gerrit clones receive Wikimedia Gerrit’s official commit-msg hook, including when cloning from a GitHub mirror before switching the remote to Gerrit. This adds Change-Id trailers when you commit. Existing hooks and any configured core.hooksPath are preserved.

Use --jobs 4 (or -j 4) to clone up to four independent skins/extensions at a time. Core is always cloned first. The default is one job.

--core
Get MediaWiki core
--dry-run
Show what would be done without actually doing it
--extension <strings>
Get MediaWiki extension
--gerrit-interaction-type <string>
How to interact with Gerrit (overriding config) (http, ssh)
--gerrit-username <string>
Gerrit username / shell name for ssh interaction type (overriding config)
-j, --jobs <int>
Maximum simultaneous skin/extension clones (core is cloned first) Default: 1.
--no-commit-hook
Do not download/install the Gerrit commit-msg hook
--shallow
Clone with --depth=1
--skin <strings>
Get MediaWiki skin
--use-github
Use GitHub for speed & switch to Gerrit remotes after
-c, --context <string>
Development context to use (overrides CONTEXT) Default: default.
--help
Help for this command
--no-interaction
Do not ask any interactive questions
-v, --verbose <count>
Increase output verbosity. Example: --verbose=2 or -vv
Terminal window
mw dev mediawiki get-code --core
mw dev mediawiki get-code --core --use-github --shallow
mw dev mediawiki get-code --core --gerrit-interaction-type ssh --gerrit-username addshore
mw dev mediawiki get-code --skin Vector
mw dev mediawiki get-code --skin Vector -- skin MonoBook
mw dev mediawiki get-code --extension Wikibase --extension OAuth
mw dev mediawiki get-code --core --skin Vector --extension Wikibase
Report an issue with this page

Report a documentation issue

The report includes this page’s link, section and documentation version.

Review and submit on Phabricator, or run the command using your saved CLI profile. The command asks before creating the task.