Fix build number not resetting on successful build

This commit is contained in:
ferreo 2024-08-24 16:10:19 +01:00
parent e0662bba40
commit 64fa81f620

View File

@ -198,7 +198,11 @@ func updateBuildState(item domain.BuildQueueItem, buildStatus domain.PackageStat
state.Status = string(buildStatus)
state.Type = string(item.Type)
state.BuildVersion = item.BuildVersion
state.BuildNumber++
if state.Status == string(domain.Built) {
state.BuildNumber = 0
} else {
state.BuildNumber++
}
helpers.DBInst.UpdateBuildState(state)
}