From 64fa81f6208f8644fb1aadc313d797d535dc3736 Mon Sep 17 00:00:00 2001 From: ferreo Date: Sat, 24 Aug 2024 16:10:19 +0100 Subject: [PATCH] Fix build number not resetting on successful build --- buildqueue/worker.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) }