Add the module's source code
()
| 440 | |
| 441 | // Add the module's source code |
| 442 | func (m *PythonSdk) WithSource() *PythonSdk { |
| 443 | m.Container = m.Container. |
| 444 | WithWorkdir(path.Join(m.ContextDirPath, m.SubPath)). |
| 445 | WithMountedDirectory(m.ContextDirPath, m.ContextDir). |
| 446 | // These are added as late as possible to avoid cache invalidation |
| 447 | // between different modules. It may be used by the runtime entrypoint |
| 448 | // so only needed in ModuleRuntime but added here so that extension |
| 449 | // modules get it for free since they need to reimplement ModuleRuntime. |
| 450 | // It's ok since the previous layer is already dependent on the target |
| 451 | // module's sources. |
| 452 | WithEnvVariable("DAGGER_MODULE", m.ModName). |
| 453 | WithEnvVariable("DAGGER_DEFAULT_PYTHON_PACKAGE", m.PackageName). |
| 454 | WithEnvVariable("DAGGER_MAIN_OBJECT", m.MainObjectName) |
| 455 | return m |
| 456 | } |
| 457 | |
| 458 | // Make any updates to current source |
| 459 | func (m *PythonSdk) WithUpdates() *PythonSdk { |
no test coverage detected