Documentation du code de SPIP et de ses plugins

SVP

git.php

Gestion du téléporteur GIT.

Tags
plugin

SVP pour SPIP

license

GPL

Table of Contents

Constants

_GIT_COMMAND  = 'git'

Functions

teleporter_git_dist()  : bool
Téléporter et déballer un composant GIT
teleporter_git_read()  : string|bool|array<string|int, mixed>
Lire l'état GIT du repository
teleporter_git_exec()  : void
Exécuter une commande GIT
teleporter_git_tester()  : bool
Tester si la commande 'git' est disponible

Constants

_GIT_COMMAND

public mixed _GIT_COMMAND = 'git'

Functions

teleporter_git_dist()

Téléporter et déballer un composant GIT

teleporter_git_dist(string $methode, string $source, string $dest[, array<string|int, mixed> $options = [] ]) : bool

Déployer un repository GIT depuis une source et une révision données

Parameters
$methode : string

Méthode de téléportation : http|git|svn|...

$source : string

URL de la source GIT

$dest : string

Chemin du répertoire de destination

$options : array<string|int, mixed> = []

Tableau d'options. Index possibles :

  • revision => 'ae89'
  • branche => 'xxx'
Return values
bool

True si l'opération réussie, false sinon.

teleporter_git_read()

Lire l'état GIT du repository

teleporter_git_read(string $dest[, array<string|int, mixed> $options = [] ]) : string|bool|array<string|int, mixed>

Retourne les informations GIT d'un répertoire donné

Parameters
$dest : string

Chemin du répertoire à tester

$options : array<string|int, mixed> = []

Tableau d'options

Return values
string|bool|array<string|int, mixed>
  • Chaîne vide si pas un dépot GIT
  • False si erreur sur le dépot GIT
  • array sinon. Tableau avec 3 index : -- source : Source du dépot GIT à cette destination -- revision : Révision du dépot -- dest : Répertoire du dépot.

teleporter_git_exec()

Exécuter une commande GIT

teleporter_git_exec(string $dest, string $command) : void
Parameters
$dest : string

Répertoire de destination

$command : string

Commande à exécuter

teleporter_git_tester()

Tester si la commande 'git' est disponible

teleporter_git_tester() : bool
Return values
bool

true si on peut utiliser la commande svn


        
On this page

Search results