kibana/tasks/build
jasper 3c264cdb64 build: remove deepModules hackery (#9330)
Backports PR #9327

**Commit 1:**
build: remove deepModules hackery

The deepModules hacks in the build system were added to support the long
paths that resulted from npm2, but npm3 fundamentally addresses that
problem, so deepModules is no longer necessary. In practical terms, npm3
shouldn't ever cause path lengths to become so long that they trigger
path length problems on certain operating systems.

* Original sha: 19fcc93ad3
* Authored by Court Ewing <court@epixa.com> on 2016-12-02T00:13:13Z
2016-12-01 19:56:27 -05:00
..
package_scripts [build] Remove user before group 2016-07-07 15:40:18 -05:00
archives.js internal: Cleanup code in _build:archives task 2016-07-05 21:20:48 -04:00
babel_cache.js [build] Include babelcache so it can be chowned to kibana user 2016-06-15 07:44:12 -05:00
babel_options.js [rename] hunt down remaining non-snake path refs 2016-02-24 14:18:21 -08:00
data.js [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
download_node_builds.js [build] Check SHA sum of downloaded node package (#8890) 2016-10-29 11:22:00 -04:00
index.js build: remove deepModules hackery (#9330) 2016-12-01 19:56:27 -05:00
install_npm_deps.js [rename] rename all files to snake_case 2016-02-24 12:14:05 -08:00
installed_plugins.js [folder structure] plugins/.data -> data 2016-07-05 14:06:16 -05:00
os_packages.js Use x86_64 in build name instead of x64 2016-07-20 10:37:01 -04:00
os_shell_scripts.js [hotfix/build] Fix a bug where removing a directory failed under Linux systems 2016-03-18 13:55:00 -03:00
package_json.js build: remove deepModules hackery (#9330) 2016-12-01 19:56:27 -05:00
pleaserun.js [build] Add package log path 2016-06-30 11:12:19 -05:00
readme.js Bump marked 2016-07-27 08:54:33 -05:00
remove_pkg_json_deps.js [rename] rename all files to snake_case 2016-02-24 12:14:05 -08:00
shasums.js Apply -snapshot suffix during build task 2016-06-11 15:57:30 -04:00
versioned_links.js Apply -snapshot suffix during build task 2016-06-11 15:57:30 -04:00

let marked = require('marked');
let Promise = require('bluebird');
let { join } = require('path');
let _ = require('lodash');
let fs = require('fs');

module.exports = function (grunt) {
  grunt.registerTask('_build:readme', function () {
    function transformReadme(readme) {
      return readme.replace(/\s##\sSnapshot\sBuilds[\s\S]*/, '');
    }

    grunt.file.copy('LICENSE.md', 'build/kibana/LICENSE.txt');
    grunt.file.write('build/kibana/README.txt', transformReadme(grunt.file.read('README.md')));
  });

};