* adjust for build by tag.

This commit is contained in:
wangyidong
2020-12-11 16:10:41 +08:00
parent 4b3e092822
commit f7d642e843
+2 -1
View File
@@ -91,6 +91,7 @@ class gitModel extends model
$lastTag = '';
foreach($tags as $tag)
{
if(empty($tag)) continue;
if(!$isNew and $tag == $job->lastTag)
{
$isNew = true;
@@ -99,7 +100,7 @@ class gitModel extends model
if(!$isNew) continue;
$lastTag = $tag;
$this->loadModel('compile')->createByJob($job->id, $lastTag, 'tag');
if($lastTag) $this->loadModel('compile')->createByJob($job->id, $lastTag, 'tag');
}
if($lastTag) $this->dao->update(TABLE_JOB)->set('lastTag')->eq($lastTag)->where('id')->eq($job->id)->exec();
}