From eccf453110726a13bd24478ddec5bb9090445e0a Mon Sep 17 00:00:00 2001 From: Choicky ZHOU Date: Thu, 19 Dec 2019 22:47:47 +0800 Subject: [PATCH 1/2] git pull --recurse-submodules change from "git pull" to "git pull --recurse-submodules" --- deployer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployer.php b/deployer.php index e7bb53d..5b1885c 100644 --- a/deployer.php +++ b/deployer.php @@ -131,7 +131,7 @@ function forbid($file, $reason) { /** * Attempt to pull, returing the output and exit code */ - exec(GIT . " pull 2>&1", $output, $exit); + exec(GIT . " pull --recurse-submodules 2>&1", $output, $exit); // reformat the output as a string $output = (!empty($output) ? implode("\n", $output) : "[no output]") . "\n"; From 86a16d65a5e93eea3c12970499d4d8b99efe6243 Mon Sep 17 00:00:00 2001 From: Choicky ZHOU Date: Sun, 22 Dec 2019 11:55:56 +0800 Subject: [PATCH 2/2] Update deploy.sample.php --- deploy.sample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sample.php b/deploy.sample.php index 70b477e..ecc6539 100644 --- a/deploy.sample.php +++ b/deploy.sample.php @@ -6,7 +6,7 @@ define("LOGFILE", "deploy.log"); // The name of the file you want to log to. define("GIT", "/usr/bin/git"); // The path to the git executable define("MAX_EXECUTION_TIME", 180); // Override for PHP's max_execution_time (may need set in php.ini) -define("BEFORE_PULL", ""); // A command to execute before pulling +define("BEFORE_PULL", "/usr/bin/git reset --hard @{u}"); // A command to execute before pulling define("AFTER_PULL", ""); // A command to execute after successfully pulling require_once("deployer.php");