fix: Include third party licenses in the docker image (#19144)

This commit is contained in:
Tomi Turtiainen
2025-09-03 17:16:46 +03:00
committed by GitHub
parent 6847c33f14
commit cda1a18a88
2 changed files with 10 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
# We want to include the THIRD_PARTY_LICENSES.md file in the Docker image,
# but not other .md files
**/*.md
!**/THIRD_PARTY_LICENSES.md
**/.env
.cache
assets

View File

@@ -30,6 +30,7 @@ const rootDir = isInScriptsDir ? path.join(scriptDir, '..') : scriptDir;
const config = {
compiledAppDir: path.join(rootDir, 'compiled'),
compiledTaskRunnerDir: path.join(rootDir, 'dist', 'task-runner-javascript'),
cliDir: path.join(rootDir, 'packages', 'cli'),
rootDir: rootDir,
};
@@ -117,7 +118,6 @@ try {
}
echo(chalk.green('✅ pnpm install and build completed'));
} catch (error) {
console.error(chalk.red('\n🛑 BUILD PROCESS FAILED!'));
console.error(chalk.red('An error occurred during the build process:'));
@@ -246,6 +246,12 @@ const buildManifest = {
},
};
// Copy third-party licenses if they exist
const licensesSourcePath = path.join(config.cliDir, 'THIRD_PARTY_LICENSES.md');
if (await fs.pathExists(licensesSourcePath)) {
await fs.copy(licensesSourcePath, path.join(config.compiledAppDir, 'THIRD_PARTY_LICENSES.md'));
}
await fs.writeJson(path.join(config.compiledAppDir, 'build-manifest.json'), buildManifest, {
spaces: 2,
});