Elŝuti el Git

From mediawiki.org
This page is a translated version of the page Download from Git and the translation is 46% complete.
Outdated translations are marked like this.

Git is a distributed version control system. It allows you to download the very latest version of the source code, with all the branches and tagged releases at your disposal.

You should download from Git if you are a developer and want to submit patches.

If you do not want to develop but only install MediaWiki and extensions, then download stable tarball releases instead.

Vidu Git por pli da detaloj, speciale por kontribui. Jen iuj konvenaj instrukcioj pri kelkaj oftaj taskoj.

Postulitoj

Vi devas instali Git antaŭ vi povas uzi ĝin. Estas multaj metodoj por akiri Git, depende de via mastruma sistemo. Por fontokodo kaj oficialaj duumaj dosieroj, vidu la retejon [$link git-scm.com]. Por aliaj metodoj por instali Git, uzu serĉilon por trovi instrukciojn pri via mastruma sistemo. Follow Gerrit/Tutorial#Set up Git, or use your favorite search engine.

Ni rekomendas ke vi instalu Composer por elŝuti kaj instali eksterajn bibliotekojn, sed tio ne necesas.

Uzi Git-on por elŝuti MediaVikion

Elŝuti

Vi povas elŝuti per Git la kernon de MediaVikio, kaj ĉiujn etendaĵon nun instalitajn en la servilaro de la Vikimedia Fondaĵo, kaj multajn aliajn etendaĵon gastigitajn en gerrit .

La unua paŝo estas kloni la kernen deponejon de MediaVikio. Por tio vi atendas iom da daŭro.

Elŝuti por evoluigo

The latest development version of MediaWiki is tracked in the 'master' branch.

First make sure that you have created a developer account, so that you have an SSH username.

En terminalo, rulu la jenan komandon:

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki

Tio klonas la tutan deponejon de MediaVikia kerno, sinkronigita al la mastra branĉo en subdosierujon mediawiki.

To install into a different directory, change that in the command line (for more info refer to these docs). Once the repository is cloned, you can switch to different branches or tags. The development branch, master, is the cutting-edge, developer version of MediaWiki; you should not use master code for production under any circumstances as it is not considered stable.

Download a stable branch

If you do not want to develop software patches but want to anonymously clone the stable release branch 1.41, use this command instead:

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_41 mediawiki

Se vi volas redukti la nombron de revizioj klonotaj, aldonu --depth=1 al la ĉi-supra komando.

MediaVikiaj etikedoj (stabila versio)

Alternatively, specific stable versions of MediaWiki are tracked using 'tags'. These are analogous to the tarball releases. Currently, these are 1.41.1 (stable), 1.39.7 (LTS) and 1.39.7 (legacy LTS).

Vi povas vidi ĉiujn haveblajn etikedojn per:

git tag -l | sort -V

Uzi specifan etikedon, ekz. por la plej aktuala stabila versio:

git checkout 1.41.1

Update the Git submodules

The branches and tags have a bunch of Git submodules in them, for commonly-used extensions and skins and for the vendor/ directory. The master branch does not have these. To update the submodules, run:

cd mediawiki
git submodule update --init --recursive

Preni eksterajn bibliotekojn

MediaWiki uses Composer to manage external PHP libraries, all of which end up in the vendor/ directory in your MediaWiki directory.

Jen metodoj por instali tiujn necesajn bibliotekojn:

  • Download and install the composer PHAR, optionally rename the composer.phar file as instructed for your OS, and then run composer update --no-dev from your MediaWiki directory. This is the recommended approach.
    • If the default PHP CLI version does not match the web server's PHP version, specify it with e.g. php7.4 composer.phar update --no-dev.
  • Or, if you don't want to use Composer or if you want to use the exact same set of vendor libraries as used on the WMF production cluster, you can instead create a vendor/ directory inside the core folder of your MediaWiki installation:


git clone https://gerrit.wikimedia.org/r/mediawiki/vendor.git

    • Note that if any of your extensions have their own Composer requirements, then you cannot use this option.

Antaŭ MediaVikio 1.25, eksteraj bibliotekoj estis tenataj en la kerna deponejo, kaj postulis nenian pakaĵomastrumilon.

Ĝisdatigi

If you're using a particular branch or the development version ("master" branch) of MediaWiki, picking up the latest changes is relatively easy. Change into your MediaWiki clone directory and issue this command:

git pull

Efektiviĝos ĉiuj de la aktualaj ŝanĝoj en la branĉo uzata de vi.

La nova versio de la kerno eble postulas novaj versiojn de etendaĵoj kaj etosoj. Tial vi devas eniri en ĉiun dosierujon de etendaĵo aŭ etoso kaj ĝisdatigi ĝin per komando kiel git pull --recurse-submodules.

You also need to update vendor/ with any newer versions of required libraries. This often means running the following Composer command, but see #Fetch external libraries above for more details:

composer update --no-dev

After updating/upgrading the code and required libraries you should run the MediaWiki update.php command-line script to update database tables as needed:

php maintenance/update.php

Se vi uzas MediaWiki-Vagrant , estas simpla komando, vagrant git-update, kiu faras ĉiujn da ĉi-supraĵoj.

Ŝanĝi al alia versio

Each of our versions are tracked as branches or tags. In order to switch to a different version (for example from the master branch to a different branch or tag), checkout the particular branch or tag you want from within your MediaWiki clone directory:

git checkout <branĉonomo>

git checkout <etikedonomo>

La ŝanĝoj efektiviĝos aŭtomate, kaj ĉio estos preta.

Uzi Git-on por elŝuti etendaĵoĵn de MediaVikio

Listo de etendaĵoj en git

Elŝuti etendaĵon

<EXT> estas la nomo de la etendaĵo kiun vi volas elŝuti, sen spacoj. Ekzemple, por la etendaĵo Extension:TitleKey , ĝi estus TitleKey (la uskleco gravas!).

Elŝutu kaj klonu etendaĵon el Git:

With your developer account, use these commands to get the master branch:

cd /path/to/extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/<EXT>

To clone and checkout a stable release branch instead, use these commands:

cd /path/to/extensions
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/<EXT> --branch REL1_41

You can view extension source code in Gerrit's gitiles application, and at the URL:

https://gerrit.wikimedia.org/g/mediawiki/extensions/<EXT>/+/HEAD


Elŝuti ĉiujn etendaĵojn

If you prefer to have all MediaWiki extensions that are at gerrit.wikimedia.org checked out to your machine, enter the following:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions

Or, to checkout stable releases branch instead, use this command:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions --branch REL1_41

After running the git clone command, continue with these commands:

cd /path/to/extensions
git submodule update --init --recursive

Poste, por ĝisdatigi ĉiujn etendaĵojn al aktualaj versioj de tiu branĉo, simple enigu:

cd /path/to/extensions
git pull
git submodule update --init --recursive

Por ŝanĝi al alia branĉo, ekz. post eldono de nova versio:

git submodule foreach 'git checkout -b REL1_40 origin/REL1_40 || :'

Remember that you should only use versions of extensions from the same release as that version of MediaWiki and each other.

Por sekvi la mastran branĉon:

git submodule foreach 'git checkout -b origin/master || :'

Bonvolu noti ke vi ne uzu la mastran kodon por produktado pro ajna kialo, ĉar ĝi ne estas stabila.

If you only need a read-only checkout (for instance to grep or analyse all MediaWiki code), you can use the shared MediaWiki checkout on Labs, without downloading anything on your machines.

Forigi etendaĵon

  1. Remove the "require_once …" or "wfLoadExtension( … )" from LocalSettings.php
  1. Remove any line referencing the extension in composer.local.json (usually in the "extra → merge-plugin → include" section)
  1. Remove the extension's directory in install-dir/extensions/

Uzi Git-on por elŝuti MediaVikiajn etosojn

Listo de etosoj en git

Versio 1.24 kaj pli postaj versioj ne inkluzivas etosojn en la Git-elŝutaĵo.

Follow the exact same procedure as for extensions (described in the previous section), but using skins rather than extensions in all URLs and paths.

Detailed installation instructions are available on each skin's page here on MediaWiki.org, for example see Skin:Vector#Installation. Instructions for all other skins are analogous.

Vidu ankaŭ

Apendico

The Revision as of 14:26, 21 March 2019 changed the standard of linking to gerrit.wikimedia.org:

de:

gerrit.wikimedia.org/r/p/mediawiki

al:

gerrit.wikimedia.org/r/mediawiki