mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[packages] Copy files when making os packages
This commit is contained in:
parent
3b992d66c5
commit
9a19b978ba
1 changed files with 6 additions and 3 deletions
|
@ -12,18 +12,21 @@ module.exports = function (grunt) {
|
|||
return resolve(rootPath, file);
|
||||
});
|
||||
|
||||
let ln = (source, link) => exec('ln', ['-s', source, link]);
|
||||
//We don't want to build os packages with symlinks
|
||||
let transferFiles = (source, link) => grunt.option('os-packages')
|
||||
? exec('cp', ['-r', source, link])
|
||||
: exec('ln', ['-s', source, link]);
|
||||
|
||||
grunt.config.get('platforms').forEach(function (platform) {
|
||||
grunt.file.mkdir(platform.buildDir);
|
||||
|
||||
// link all files at the root of the build
|
||||
buildFiles.forEach(function (source) {
|
||||
ln(source, resolve(platform.buildDir, basename(source)));
|
||||
transferFiles(source, resolve(platform.buildDir, basename(source)));
|
||||
});
|
||||
|
||||
// link the node modules
|
||||
ln(platform.nodeDir, resolve(platform.buildDir, 'node'));
|
||||
transferFiles(platform.nodeDir, resolve(platform.buildDir, 'node'));
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue