Changed behavior so triggered builds ignore version

Version checks are only done on polling projects.
This commit is contained in:
Tim Shannon 2016-05-04 08:35:36 -05:00
parent d0b745cc9f
commit 22db2cfdad

View File

@ -110,18 +110,20 @@ func (p *Project) fetch() {
p.setVersion(strings.TrimSpace(string(version))) p.setVersion(strings.TrimSpace(string(version)))
// check if this specific version has attempted a build yet if p.poll > 0 {
lVer, err := p.ds.LastVersion(stageBuild) // if polling, check if this specific version has attempted a build yet
if err != datastore.ErrNotFound && p.errHandled(err) { lVer, err := p.ds.LastVersion(stageBuild)
return if err != datastore.ErrNotFound && p.errHandled(err) {
} return
}
if p.version == "" || p.version == lVer.Version { if p.version == "" || p.version == lVer.Version {
// no new build clean up temp dir // no new build clean up temp dir
p.errHandled(os.RemoveAll(tempDir)) p.errHandled(os.RemoveAll(tempDir))
vlog("No new version found for Project: %s Version: %s.\n", p.id(), p.version) vlog("No new version found for Project: %s Version: %s.\n", p.id(), p.version)
return return
}
} }
//remove any existing data that matches version hash //remove any existing data that matches version hash