Skip to content

Commit

Permalink
Don't force latest k6 when building extensions
Browse files Browse the repository at this point in the history
an extension will always require k6 and a version of it. It makes little
sense to force newer version on users especially as we keep breaking
them and we need time to go fix them, but that can only happen after
release.

This still lets users specify the version (as latest for example) and
require the latest k6, it just isn't the default.
  • Loading branch information
mstoykov committed May 11, 2022
1 parent 9001905 commit fa72d58
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ func (b Builder) newEnvironment(ctx context.Context) (*environment, error) {
log.Println("[INFO] Pinning versions")
if b.K6Repo == "" {
// building with the default main repo
err = env.execGoModRequire(ctx, k6ModulePath, env.k6Version)
if err != nil {
return nil, err
if env.k6Version != "" {
// don't actually specify k6 version if it wasn't specified
// the extension(s) will require a version that they work with either way
err = env.execGoModRequire(ctx, k6ModulePath, env.k6Version)
if err != nil {
return nil, err
}
}
} else {
// building with a forked repo, so get the main one and replace it with
Expand Down

0 comments on commit fa72d58

Please sign in to comment.