Difference between revisions 2735165 and 2787212 on mediawikiwiki<languages /> : "Јер mediawiki верзија 1.19beta2, 1.18.2, 1.17.3, језгра mediawiki и додатака користе [[$Special:MyLanguage/Gerrit|у гит]] за контролу верзије. За старије верзије, погледајте [[$SVN|са субверзија]]" "'[[w:Git (software)|Git]]"' - то је дистрибуира контрола верзије софтвера, који омогућава корисницима да преузмете најновију верзију гране, не чекајући некога око да се спакује га. Mediawiki не може да се ослободи брже, а то ће бити лакше за вас да ажурирате инсталације, вратити исправке, или [$багзиллу пошаљу закрпе]. (Наравно увек се сећам званичне стабилна издања су мање ризично.) Цм. [[Special:MyLanguage/Gerrit|Git]] за више детаља, посебно за плаћање доприноса. Испод су неке брзе правцима на неколико заједничких задатака. == Предуслови == <div class="mw-translate-fuzzy">⏎ Морате да инсталирате гит, пре него што можете да га користите. Постоји много различитих начина за стицање Гит, у зависности од вашег оперативног система. За извор и званичне бинарних датотека, погледајте [https://git-scm.com/ git-scm.com]. За алтернативних начина инсталације гит, користите свој омиљени претраживач да пронађете упутства за ваш оперативни систем. </div> <div class="mw-translate-fuzzy"> Препоручује се да имате $[https://getcomposer.org/ cComposer] инсталиран да преузмете и инсталирате независних библиотеке, али није обавезно.⏎ </div> == Преко гит да преузмете mediawiki == === Преузети === Можете преузети језгра mediawiki преко гит, као и све додатке инсталиране на кластеру сервера Фондације Викимедија и многих других додатака, постављен на ${{ll|gerrit}}. Први корак-да клонира репозитарий језгра mediawiki. То ће потрајати неко време. У прозору терминала, унесите следећу команду: {{#tag:syntaxhighlight| git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git --branch {{MW stable branch git}} install-dir |lang=bash}} This clones the entire MediaWiki core repository, initially pointed at release branch {{MW stable branch number}}, into a sub-directory named <code>install-dir</code>. To install into different directory, change that in the command line (for more info [https://git-scm.com/docs/git-clone refer to these docs]). Once the repository is cloned, you can easily switch to different branches or tags (see below), including those tracking unstable versions of MediaWiki. The development branch, <code>master</code>, 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. If you want to reduce the number of revisions that are cloned, add <code>--depth=1</code> to the above command. That the release branches have a bunch of Git submodules in them, for commonly-used extensions and skins (the master branch does not have these). To update the submodules, run: {{#tag:syntaxhighlight| cd install-dir git submodule update --init |lang=bash}} ==== Довнлоад за развој ==== Ако имате [[Special:MyLanguage/Developer access|Девелопер приступ]] (који је лако да затражи), уместо клонирање анонимно са https, морате да клона са својим путем SSH "<КОРИСНИК>" тако да можете да замислите промене за коментар: {{#tag:syntaxhighlight| git clone ssh://<Корисничко име>@gerrit.wikimedia.org:29418/mediawiki/core.git --branch {{MW stable branch git}} install-dir |lang=bash}} * {{git file|action=tree|project=mediawiki/core|branch=master|text=Погледајте најновији изворни код}} {{anchor|Fetch external libraries}} ==== Узорак спољних библиотека ==== Почевши са mediawiki 1.25, неким страним библиотекама да mediawiki захтева више у то "језгро" гит гит.⏎ <div class="mw-translate-fuzzy"> Ми користимо [[composer]], да би њима управљали. </div>⏎ ⏎ Да бисте инсталирали ове неопходне библиотеке, имате избор: <div class="mw-translate-fuzzy"> * [https://getcomposer.org/doc/00-intro.md#globally преузмите и инсталирајте композитор], пребаците на ваш главни директоријум и покрените '''<code>composer installupdate --no-dev</code>'''. </div> Note that if you have an existing <code>composer.lock</code> file you will need to run '''<code>composer update --no-dev</code>''' instead. * I⏎ ⏎ * Or, if you don't want to use cComposer, or if you want to use the exact same set of vendor libraries as used on the WMF production cluster, you can instead <code>git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git</code> to create a <code>vendor/</code> directory inside the core folder of your MediaWiki installation. Note that if any of your extensions have their own Composer requirements, then '''you can not use this option'''. <div class="mw-translate-fuzzy"> Почевши са mediawiki 1.25, неким страним библиотекама да mediawiki захтева више у то "језгро" гит гит. </div> ===== MediaWiki tags (stable version) ===== Alternatively, specific stable versions of MediaWiki are tracked using 'tags'. These are analogous to the tarball releases. You can see the versionsCurrently, these are {{MW stable release number}} (stable), {{MW legacy lts release number}} ([[LTS]]) and {{MW legacy release number}} (legacy). You can see all available tags with: <syntaxhighlight lang="bash"> git tag -l | sort -V </syntaxhighlight> Using non GNU sort command, such as on Mac OS X, you have to rely on the good old separators: <syntaxhighlight lang="bash"> git tag -l | sort -n -t. -k1 -k2 -k3 </syntaxhighlight> To use a specific tag, e.g. the latest stable release: {{#tag:syntaxhighlight| git checkout <tag name>{{MW stable release number}} |lang=bash}} ==== Latest development version of MediaWiki ==== The latest development version of MediaWiki is tracked in the 'master' branch. This is what is locally checked out by default when you first clone the MediaWiki repository. If you have switched to another branch but would like to switch back to using bleeding-edge MediaWiki, do: <syntaxhighlight lang="bash"> git checkout master </syntaxhighlight> === Keeping up to date === 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 the <code>git pull</code> command: <syntaxhighlight lang="bash"> git pull </syntaxhighlight> All of the latest changes for the branch you are using will be applied. The new version of core may require newer versions of extensions and skins, so you must go into each extension and skin directory and update it with a command like <code>git pull --recurse-submodules</code>. After updating/upgradingYou also need to update <code>vendor/</code> with any newer versions of required libraries. This often means running the following Composer command, but see [[#Fetch external libraries]] above for more details: <syntaxhighlight lang="bash"> composer update --no-dev </syntaxhighlight> After updating/upgrading the code and required libraries you should run the MediaWiki <code>{{ll|Manual:update.php|update.php}}</code> command-line script to update database tables as needed: <syntaxhighlight lang="bash"> php maintenance/update.php </syntaxhighlight> You also need to update <code>mediawiki/vendor</code> to any newer versions of required libraries, see [[#Fetch external libraries]].⏎ If you use [[MediaWiki-Vagrant]], it offers a single command, <code>vagrant git-update</code>, that performs all these steps. === Switching to a different version === (contracted; show full) Please note that '''you should not use master code for production''' under any circumstances as it is not considered stable. If you only need a read-only checkout (for instance to grep or analyse all MediaWiki code), you can use the [[wikitech:Help:Shared_storage#/shared/mediawiki/|shared MediaWiki checkout on Labs]], without downloading anything on your machines. === Remove an extension === Just remove the extension folder and r# Remove the "<code>require_once …</code>" or "<code>wfLoadExtension( … )</code>" from <code>LocalSettings.php</code>.⏎ # Remove any line referencing the extension in <code>composer.local.json</code> (usually in the "extra → merge-plugin → include" section) # Remove the extension's directory in <code>install-dir/extensions/</code> == Using Git to download MediaWiki skins == : [https://gerrit.wikimedia.org/r/#/admin/projects/?filter=mediawiki%252Fskins%252F List of skins in git] MediaWiki 1.24 and later don't include skins in the Git download. Follow the exact same procedure as for extensions (described in the previous section), but using <code>skins</code> rather than <code>extensions</code> in all URLs and paths. Detailed installation instructions are available on each skin's page here on MediaWiki.org, for example see [[Special:MyLanguage/Skin:Vector#Installation|Skin:Vector#Installation]]. Instructions for all other skins are analogous. == See also == * [[Special:MyLanguage/Migrating from SVN to Git|Migrating from SVN to Git]] * [[Special:MyLanguage/Nightlies|Nightlies]], an alternate to downloading from Git * [[Special:MyLanguage/Intranet/Intranet Installation|Intranet/Intranet Installation]], part of a fully worked series of articles that uses Git for Mediawiki deployment [[Category:MediaWiki development{{#translation:}}]] [[Category:MediaWiki Introduction{{#translation:}}]] [[Category:Installation{{#translation:}}]] [[Category:Git{{#translation:}}]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://mediawiki.org/w/index.php?diff=prev&oldid=2787212.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|