async function updateAllScriptSourcesInRepo()

in build/src/prep.js [210:230]


async function updateAllScriptSourcesInRepo(repo, release, updateScriptSha) {
    const definitionFolder = path.join(__dirname, '..', '..', 'containers');
    // Update script versions in definition Dockerfiles for release
    const allDefinitions = await asyncUtils.readdir(definitionFolder, { withFileTypes: true });
    await asyncUtils.forEach(allDefinitions, async (currentDefinition) => {
        if (!currentDefinition.isDirectory()) {
            return;
        }

        const dockerFileBasePath = path.join(definitionFolder, currentDefinition.name, '.devcontainer', 'base.Dockerfile');
        if (await asyncUtils.exists(dockerFileBasePath)) {
            console.log(`(*) Looking for script source in base.Dockerfile for ${currentDefinition.name}.`);
            await updateScriptSourcesInDockerfile(dockerFileBasePath, repo, release, updateScriptSha);
        }
        const dockerFilePath = path.join(definitionFolder, currentDefinition.name, '.devcontainer', 'Dockerfile');
        if (await asyncUtils.exists(dockerFilePath)) {
            console.log(`(*) Looking for script source in Dockerfile for ${currentDefinition.name}.`);
            await updateScriptSourcesInDockerfile(dockerFilePath, repo, release, updateScriptSha);
        }
    });
}