Commit 37059e58 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout du git reset --hard pour éviter tout blocage en cas de modif locale

parent 3f841fb2
Loading
Loading
Loading
Loading
Loading
+2 −0
Changes for module/Administration/src/Command/UpdateCodeCommand.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ class UpdateCodeCommand extends Command

        // Récupération des sources
        $io->section("Mise à jour des fichiers à partir de GIT");
        $this->exec("git reset --hard"); // purge des modifs locales
        $tbr = $repo->tagIsValid($version) ? 'tags/' : '';
        if ($version == $repo->getCurrentBranche()) {
            $updcmd = 'git pull';
@@ -112,5 +113,6 @@ class UpdateCodeCommand extends Command
        } catch (ProcessFailedException $exception) {
            throw new \RuntimeException('Erreur lors de l\'exécution de la commande : ' . $exception->getMessage());
        }
        
    }
}
 No newline at end of file