fix +b
This commit is contained in:
parent
9ac297d0c8
commit
654fcbcd67
@ -2,6 +2,7 @@ package buildqueue
|
||||
|
||||
import (
|
||||
"brunel/domain"
|
||||
"strings"
|
||||
|
||||
"errors"
|
||||
|
||||
@ -11,6 +12,9 @@ import (
|
||||
var queue = haxmap.New[string, domain.BuildQueueItem]()
|
||||
|
||||
func Add(buildItem domain.BuildQueueItem) error {
|
||||
if strings.Contains(buildItem.BuildVersion, "+b") {
|
||||
buildItem.BuildVersion = strings.Split(buildItem.BuildVersion, "+b")[0]
|
||||
}
|
||||
if _, ok := queue.Get(buildItem.Source.Name); ok {
|
||||
return errors.New("package already in queue")
|
||||
}
|
||||
|
@ -239,6 +239,7 @@ func ProcessMissingPackages(internalPackages *fastmap.Fastmap[string, domain.Sou
|
||||
newStatus := domain.Missing
|
||||
src.Packages.Iter(func(k string, v domain.PackageInfo) bool {
|
||||
v.Status = newStatus
|
||||
v.Version = strings.Split(v.Version, "+b")[0]
|
||||
src.Packages.Set(k, v)
|
||||
return true
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user