rename crontask, update task to clear the module before cloning to get the latest markdown

This commit is contained in:
Mike Andrewartha 2016-02-10 09:55:31 +13:00 committed by Cam Findlay
parent f6efa1df86
commit 7fdac9b4d3
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
<?php
class UpdateDocsCronTask implements CronTask {
class DocsCronTask implements CronTask {
/**
*
* @return string

View File

@ -86,13 +86,15 @@ class UpdateTask extends BuildTask
mkdir("{$path}/src");
}
if (!file_exists("{$path}/src/{$folder}_{$branch}")) {
$this->printLine("cloning " . $remote . "/" . $branch);
chdir("{$path}/src");
exec("git clone -q git://github.com/{$remote}.git {$folder}_{$branch} --quiet");
if (file_exists("{$path}/src/{$folder}_{$branch}")) {
exec("rm -rf {$path}/src/{$folder}_{$branch}");
}
$this->printLine("cloning " . $remote . "/" . $branch);
chdir("{$path}/src");
exec("git clone -q git://github.com/{$remote}.git {$folder}_{$branch} --quiet");
chdir("{$path}/src/{$folder}_{$branch}");
exec("git fetch origin");
exec("git checkout -q origin/{$branch}");