diff --git a/buildqueue/worker.go b/buildqueue/worker.go index ca6f1ca..8db7b54 100644 --- a/buildqueue/worker.go +++ b/buildqueue/worker.go @@ -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) }