MCPcopy Create free account
hub / github.com/rilldata/rill / GetVersion

Method GetVersion

cli/pkg/local/server.go:118–128  ·  view source on GitHub ↗

GetVersion implements localv1connect.LocalServiceHandler.

(ctx context.Context, r *connect.Request[localv1.GetVersionRequest])

Source from the content-addressed store, hash-verified

116
117// GetVersion implements localv1connect.LocalServiceHandler.
118func (s *Server) GetVersion(ctx context.Context, r *connect.Request[localv1.GetVersionRequest]) (*connect.Response[localv1.GetVersionResponse], error) {
119 latestVersion, err := s.app.ch.LatestVersion(ctx)
120 if err != nil {
121 s.logger.Warn("error finding latest version", zap.Error(err))
122 }
123
124 return connect.NewResponse(&localv1.GetVersionResponse{
125 Current: s.app.ch.Version.Number,
126 Latest: latestVersion,
127 }), nil
128}
129
130// PushToGithub implements localv1connect.LocalServiceHandler.
131// It assumes that the current project is not a git repo, it should generally be called after DeployValidation.

Callers

nothing calls this directly

Calls 2

LatestVersionMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected