Compare commits
5 Commits
v0.0.1
...
renovate/a
Author | SHA1 | Date | |
---|---|---|---|
6934608b8c | |||
5ad87b6ab4 | |||
1d1b3f08f1 | |||
8524870171
|
|||
6403f26cd7
|
9
README.md
Normal file
9
README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Byg
|
||||||
|
|
||||||
|
`Byg` (Danish for `build`), is a data-structure designed for a composing
|
||||||
|
pipelines, it is in a very rough state, and changes according to the needs to
|
||||||
|
`kjuulh/bust`
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
See `examples` for example pipelines.
|
4
byg.go
4
byg.go
@@ -2,6 +2,7 @@ package byg
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"log"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
@@ -52,12 +53,15 @@ func (bb *Builder) Execute(ctx context.Context) error {
|
|||||||
defer bb.addmu.Unlock()
|
defer bb.addmu.Unlock()
|
||||||
|
|
||||||
for _, step := range bb.steps {
|
for _, step := range bb.steps {
|
||||||
|
log.Printf("executing step: %s", step.name)
|
||||||
errgroup, _ := errgroup.WithContext(ctx)
|
errgroup, _ := errgroup.WithContext(ctx)
|
||||||
|
|
||||||
for _, task := range step.tasks {
|
for _, task := range step.tasks {
|
||||||
|
func(task StepExecuteFunc) {
|
||||||
errgroup.Go(func() error {
|
errgroup.Go(func() error {
|
||||||
return task(Context{})
|
return task(Context{})
|
||||||
})
|
})
|
||||||
|
}(task)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := errgroup.Wait(); err != nil {
|
if err := errgroup.Wait(); err != nil {
|
||||||
|
6
go.mod
6
go.mod
@@ -1,5 +1,7 @@
|
|||||||
module git.front.kjuulh.io/kjuulh/byg
|
module git.front.kjuulh.io/kjuulh/byg
|
||||||
|
|
||||||
go 1.19
|
go 1.23.0
|
||||||
|
|
||||||
require golang.org/x/sync v0.1.0
|
toolchain go1.24.5
|
||||||
|
|
||||||
|
require golang.org/x/sync v0.16.0
|
||||||
|
2
go.sum
2
go.sum
@@ -1,2 +1,4 @@
|
|||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
|
||||||
|
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
|
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
Reference in New Issue
Block a user