diff --git a/src/dev/build/build_distributables.js b/src/dev/build/build_distributables.js index e3fcfd9536c4..eeffc2380f38 100644 --- a/src/dev/build/build_distributables.js +++ b/src/dev/build/build_distributables.js @@ -45,7 +45,6 @@ import { ExtractNodeBuildsTask, InstallDependenciesTask, OptimizeBuildTask, - PatchNativeModulesTask, RemovePackageJsonDepsTask, RemoveWorkspacesTask, TranspileBabelTask, @@ -131,7 +130,6 @@ export async function buildDistributables(options) { * directories and perform platform-specific steps */ await run(CreateArchivesSourcesTask); - await run(PatchNativeModulesTask); await run(CleanExtraBinScriptsTask); await run(CleanExtraBrowsersTask); await run(CleanNodeBuildsTask); diff --git a/src/dev/build/tasks/index.js b/src/dev/build/tasks/index.js index 35c07c918731..014cdc7ad5ea 100644 --- a/src/dev/build/tasks/index.js +++ b/src/dev/build/tasks/index.js @@ -36,5 +36,4 @@ export * from './transpile_babel_task'; export * from './transpile_scss_task'; export * from './verify_env_task'; export * from './write_sha_sums_task'; -export * from './patch_native_modules_task'; export * from './path_length_task'; diff --git a/src/dev/build/tasks/patch_native_modules_task.js b/src/dev/build/tasks/patch_native_modules_task.js deleted file mode 100644 index 16290aca04e7..000000000000 --- a/src/dev/build/tasks/patch_native_modules_task.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import install from '@elastic/simple-git/scripts/install'; -import { deleteAll } from '../lib'; -import path from 'path'; - -async function patchGit(config, log, build, platform) { - const downloadPath = build.resolvePathForPlatform(platform, '.git_binaries', 'git.tar.gz'); - const destination = build.resolvePathForPlatform( - platform, - 'node_modules/@elastic/simple-git/native/git' - ); - log.debug('Replacing git binaries from ' + downloadPath + ' to ' + destination); - const p = platform.isWindows() ? 'win32' : platform.getName(); - await deleteAll([destination]); - await install(p, downloadPath, destination); - await deleteAll([path.dirname(downloadPath)], log); -} - -export const PatchNativeModulesTask = { - description: 'Patching platform-specific native modules directories', - async run(config, log, build) { - await Promise.all( - config.getTargetPlatforms().map(async platform => { - if (!build.isOss()) { - await patchGit(config, log, build, platform); - } - }) - ); - }, -}; diff --git a/x-pack/package.json b/x-pack/package.json index 6a428e01fa16..6c6458b7831b 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -191,7 +191,6 @@ "@elastic/maki": "6.1.0", "@elastic/node-crypto": "^1.0.0", "@elastic/numeral": "2.3.3", - "@elastic/simple-git": "1.124.0-elastic.15", "@kbn/babel-preset": "1.0.0", "@kbn/config-schema": "1.0.0", "@kbn/elastic-idx": "1.0.0", diff --git a/yarn.lock b/yarn.lock index 6677663cd6f8..7097d36d64fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1286,15 +1286,6 @@ "@types/node-jose" "1.1.0" node-jose "1.1.0" -"@elastic/simple-git@1.124.0-elastic.15": - version "1.124.0-elastic.15" - resolved "https://registry.yarnpkg.com/@elastic/simple-git/-/simple-git-1.124.0-elastic.15.tgz#b7975e9d1aeb424c87c817e1bd0549d25ec1d2c5" - integrity sha512-Nb+WwJI9I2PN72Ue6stMUDVlqrNKuskpfKJwd+74YtyyfuV7dfHvt4FksqrjnOLbvFxJi214DZ1dHoROg3iQyQ== - dependencies: - debug "^4.0.1" - request "^2.88.0" - targz "^1.0.1" - "@elastic/ui-ace@0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@elastic/ui-ace/-/ui-ace-0.2.3.tgz#5281aed47a79b7216c55542b0675e435692f20cd" @@ -26616,7 +26607,7 @@ tape@^4.5.1: string.prototype.trim "~1.1.2" through "~2.3.8" -tar-fs@^1.16.3, tar-fs@^1.8.1: +tar-fs@^1.16.3: version "1.16.3" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== @@ -26695,13 +26686,6 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" -targz@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/targz/-/targz-1.0.1.tgz#8f76a523694cdedfbb5d60a4076ff6eeecc5398f" - integrity sha1-j3alI2lM3t+7XWCkB2/27uzFOY8= - dependencies: - tar-fs "^1.8.1" - tcomb-validation@^3.3.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tcomb-validation/-/tcomb-validation-3.4.1.tgz#a7696ec176ce56a081d9e019f8b732a5a8894b65"