Skip to content
Extraits de code Groupes Projets
Valider b69e4c5f rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Fixes #6493 Composer install can now run on Windows

parent 1362e25c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -74,16 +74,16 @@ ...@@ -74,16 +74,16 @@
], ],
"scripts": { "scripts": {
"pre-update-cmd": [ "pre-update-cmd": [
"misc/composer/clean-xhprof.sh" "Piwik\\Composer\\ScriptHandler::cleanXhprof"
], ],
"pre-install-cmd": [ "pre-install-cmd": [
"misc/composer/clean-xhprof.sh" "Piwik\\Composer\\ScriptHandler::cleanXhprof"
], ],
"post-update-cmd": [ "post-update-cmd": [
"misc/composer/build-xhprof.sh" "Piwik\\Composer\\ScriptHandler::buildXhprof"
], ],
"post-install-cmd": [ "post-install-cmd": [
"misc/composer/build-xhprof.sh" "Piwik\\Composer\\ScriptHandler::buildXhprof"
] ]
} }
} }
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Composer;
/**
* Scripts executed before/after Composer install and update.
*
* We use this PHP class because setting the bash scripts directly in composer.json breaks
* Composer on Windows systems.
*/
class ScriptHandler
{
public static function cleanXhprof()
{
if (! is_dir('vendor/facebook/xhprof/extension')) {
return;
}
passthru('misc/composer/clean-xhprof.sh');
}
public static function buildXhprof()
{
if (! is_dir('vendor/facebook/xhprof/extension')) {
return;
}
passthru('misc/composer/build-xhprof.sh');
}
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter