Skip to content

Commit f2acc8d

Browse files
authored
fix: protobuf version download (#59)
The version is starting with v, fix the download link. Signed-off-by: Francesco Canovai <[email protected]>
1 parent fa2e604 commit f2acc8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

protoc-gen-go-grpc/dagger/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"context"
77
"fmt"
88
"path"
9+
"strings"
910

1011
"dagger/protoc-gen-go-grpc/internal/dagger"
1112
)
@@ -34,8 +35,8 @@ func New(
3435
// +default="v1.3.0"
3536
protocGenGoGRPCVersion string,
3637
) *ProtocGenGoGRPC {
37-
protobufRelURL := fmt.Sprintf("https://github.com/protocolbuffers/protobuf/releases/download/v%v/protoc-%v-linux-x86_64.zip",
38-
protobufVersion, protobufVersion)
38+
protobufRelURL := fmt.Sprintf("https://github.com/protocolbuffers/protobuf/releases/download/%v/protoc-%v-linux-x86_64.zip",
39+
protobufVersion, strings.TrimPrefix(protobufVersion, "v"))
3940

4041
protobuf := dag.Container().
4142
From(goImage).

0 commit comments

Comments
 (0)