* finish task #6953.

This commit is contained in:
wangyidong
2020-03-04 15:07:49 +08:00
parent 94f8bf2dfc
commit b9d709ccc4
11 changed files with 144 additions and 108 deletions
+14
View File
@@ -141,6 +141,20 @@ class gitModel extends model
$integrations = zget($objects, 'integrations', array());
$this->loadModel('compile');
foreach($integrations as $id) $this->compile->createByIntegration($id);
// Create compile by tag.
$integrations = $this->dao->select('*')->from(TABLE_INTEGRATION)->where('triggerType')->eq('tag')->andWhere('repo')->eq($repo->id)->fetchAll('id');
foreach($integrations as $integration)
{
$dirs = $this->getRepoTags($repo);
end($dirs);
$lastTag = current($dirs);
if($lastTag != $integration->lastTag)
{
$this->compile->createByIntegration($integration->id, $lastTag, 'tag');
$this->dao->update(TABLE_INTEGRATION)->set('lastTag')->eq($lastTag)->where('id')->eq($integration->id)->exec();
}
}
}
}