Skip to content

Commit

Permalink
update k6foundry (#7)
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Chacin <[email protected]>
  • Loading branch information
pablochacin authored Jul 10, 2024
1 parent c062abe commit 4f6060a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
6 changes: 5 additions & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ func NewServer() *cobra.Command { //nolint:funlen
}

builderOpts := k6foundry.NativeBuilderOpts{
Verbose: verbose,
GoOpts: k6foundry.GoOpts{
Env: buildEnv,
CopyGoEnv: copyGoEnv,
},
}
if verbose {
builderOpts.Stdout = os.Stdout
builderOpts.Stderr = os.Stderr
}

builder, err := k6foundry.NewNativeBuilder(cmd.Context(), builderOpts)
if err != nil {
return fmt.Errorf("creating builder %w", err)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ go 1.22.2

require (
github.com/grafana/k6catalog v0.1.0
github.com/grafana/k6foundry v0.1.3
github.com/grafana/k6foundry v0.1.4
github.com/spf13/cobra v1.8.0
)

require (
github.com/Masterminds/semver v1.5.0 // indirect
github.com/google/go-cmp v0.6.0
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sirupsen/logrus v1.9.3
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/sys v0.21.0 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/grafana/k6catalog v0.1.0 h1:jLmbmB3EUJ+zyQG3hWy6dWbtMjvTkvJNx1d4LX8it6I=
github.com/grafana/k6catalog v0.1.0/go.mod h1:8R9eXAh2nb69+drkj0rZ4aemso0jcwCbPP6Q3E5LqCw=
github.com/grafana/k6foundry v0.1.2 h1:/vitrnaeVk86nh2mmaH+C2LUAvjMrT4I44xp5+cPQM0=
github.com/grafana/k6foundry v0.1.2/go.mod h1:b6n4InFgXl+3yPobmlyJfcJmLozU9CI9IIUuq8YqEiM=
github.com/grafana/k6foundry v0.1.3 h1:05sRM5ik+MsZr1tdJR/rTjI8trLpWFbG+vzmnpmsC5g=
github.com/grafana/k6foundry v0.1.3/go.mod h1:b6n4InFgXl+3yPobmlyJfcJmLozU9CI9IIUuq8YqEiM=
github.com/grafana/k6foundry v0.1.4 h1:6kPQeU1nSJiV6Y42sVRESuVfpgt/uiCwoYD729hRypM=
github.com/grafana/k6foundry v0.1.4/go.mod h1:b6n4InFgXl+3yPobmlyJfcJmLozU9CI9IIUuq8YqEiM=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
7 changes: 6 additions & 1 deletion local.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/sha1" //nolint:gosec
"errors"
"fmt"
"os"
"sort"

"github.com/grafana/k6catalog"
Expand Down Expand Up @@ -35,12 +36,16 @@ func NewLocalBuildService(ctx context.Context, config LocalBuildServiceConfig) (
}

builderOpts := k6foundry.NativeBuilderOpts{
Verbose: config.Verbose,
GoOpts: k6foundry.GoOpts{
Env: config.BuildEnv,
CopyGoEnv: config.CopyGoEnv,
},
}
if config.Verbose {
builderOpts.Stdout = os.Stdout
builderOpts.Stderr = os.Stderr
}

builder, err := k6foundry.NewNativeBuilder(ctx, builderOpts)
if err != nil {
return nil, fmt.Errorf("creating builder %w", err)
Expand Down

0 comments on commit 4f6060a

Please sign in to comment.