mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-15 17:16:45 +00:00
fix: Include third party licenses in the docker image (#19144)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user