The default behavior of the build task is to now apply the -snapshot suffix dynamically rather than us manually hardcoding and managing it within the source code itself. The `--release` flag will drop the -snapshot suffix on a build, which should be used for any release candidate. The default behavior of the build task has also changed to create rpm/deb packages as well. Since we've only confirmed that this works on linux, you can override that behavior by passing `skip-os-packages`. If you do not want to create any zip or tar.gz archives, you can pass `--skip-archives`.
29 lines
901 B
JavaScript
29 lines
901 B
JavaScript
module.exports = function (grunt) {
|
|
let { basename, resolve } = require('path');
|
|
let { forOwn } = require('lodash');
|
|
|
|
let exec = require('../utils/exec').silent;
|
|
|
|
grunt.registerTask('_build:versionedLinks', function () {
|
|
let rootPath = grunt.config.get('root');
|
|
|
|
let buildFiles = grunt.file.expand('build/kibana/{*,.*}')
|
|
.map(function (file) {
|
|
return resolve(rootPath, file);
|
|
});
|
|
|
|
let transferFiles = (source, link) => exec('cp', ['-r', 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) {
|
|
transferFiles(source, resolve(platform.buildDir, basename(source)));
|
|
});
|
|
|
|
// link the node modules
|
|
transferFiles(platform.nodeDir, resolve(platform.buildDir, 'node'));
|
|
});
|
|
});
|
|
};
|