Skip to content

Commit

Permalink
fix: correct version syntax in go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Jan 16, 2024
1 parent 717f82b commit 96d8be5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import (
"reflect"
"strings"

"github.com/TBD54566975/scaffolder"
"github.com/iancoleman/strcase"
"golang.org/x/mod/modfile"
"google.golang.org/protobuf/proto"

"github.com/TBD54566975/scaffolder"

"github.com/TBD54566975/ftl"
"github.com/TBD54566975/ftl/backend/common/exec"
"github.com/TBD54566975/ftl/backend/common/log"
Expand Down Expand Up @@ -214,7 +215,7 @@ func updateGoModule(goModPath string) (version string, err error) {
return "", fmt.Errorf("failed to parse %s: %w", goModPath, err)
}
if ftl.IsRelease(ftl.Version) {
if err := goModfile.AddRequire("github.com/TBD54566975/ftl", ftl.Version); err != nil {
if err := goModfile.AddRequire("github.com/TBD54566975/ftl", "v"+ftl.Version); err != nil {
return "", fmt.Errorf("failed to add github.com/TBD54566975/ftl to %s: %w", goModPath, err)
}
goModBytes = modfile.Format(goModfile.Syntax)
Expand Down

0 comments on commit 96d8be5

Please sign in to comment.