(ctx context.Context, introspectionJSON *dagger.File)
| 414 | } |
| 415 | |
| 416 | func (m *JavaSdk) getDaggerVersionForModule(ctx context.Context, introspectionJSON *dagger.File) (string, error) { |
| 417 | content, err := introspectionJSON.Contents(ctx) |
| 418 | if err != nil { |
| 419 | return "", err |
| 420 | } |
| 421 | var introspectJSON IntrospectJSON |
| 422 | if err = json.Unmarshal([]byte(content), &introspectJSON); err != nil { |
| 423 | return "", err |
| 424 | } |
| 425 | return fmt.Sprintf( |
| 426 | "%s-%s-module", |
| 427 | strings.TrimPrefix(introspectJSON.SchemaVersion, "v"), |
| 428 | m.moduleConfig.name, |
| 429 | ), nil |
| 430 | } |
| 431 | |
| 432 | type IntrospectJSON struct { |
| 433 | SchemaVersion string `json:"__schemaVersion"` |
no test coverage detected