Skip to content

Commit 2d73ae9

Browse files
committed
build: require local servers have commit pin
Signed-off-by: Jacob Howard <jacob.howard@docker.com>
1 parent f5bcbc0 commit 2d73ae9

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

cmd/build/main.go

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"strings"
1313

1414
"github.com/docker/mcp-registry/internal/mcp"
15-
"github.com/docker/mcp-registry/pkg/github"
1615
"github.com/docker/mcp-registry/pkg/servers"
1716
)
1817

@@ -117,26 +116,9 @@ func buildDockerEnv(additionalEnv ...string) []string {
117116
}
118117

119118
func buildMcpImage(ctx context.Context, server servers.Server) error {
120-
projectURL := server.Source.Project
121-
branch := server.Source.Branch
122119
commit := server.Source.Commit
123-
client := github.New()
124-
125-
repository, err := client.GetProjectRepository(ctx, projectURL)
126-
if err != nil {
127-
return err
128-
}
129-
130-
if branch == "" {
131-
branch = repository.GetDefaultBranch()
132-
}
133-
134120
if commit == "" {
135-
var err error
136-
commit, err = client.GetCommitSHA1(ctx, projectURL, branch)
137-
if err != nil {
138-
return err
139-
}
121+
return fmt.Errorf("local server %s must specify source.commit before building", server.Name)
140122
}
141123

142124
gitURL := server.GetContext()

0 commit comments

Comments
 (0)