mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [build] don't copy unwanted files * [build] condense mkdir/touch tasks * [i18n] verifyTranslations task has nothing to do with the build, just run in tests
This commit is contained in:
parent
0060fd17f0
commit
acd74a2b6b
10 changed files with 25 additions and 32 deletions
|
@ -1,8 +0,0 @@
|
|||
export default function (grunt) {
|
||||
grunt.registerTask('_build:babelCache', function () {
|
||||
//When running from built packages, if a plugin is installed before babelcache
|
||||
//exists it can become owned by root. This causes server startup to fail because
|
||||
//the optimization process can't write to .babelcache.json.
|
||||
grunt.file.write('build/kibana/optimize/.babelcache.json', '{}\n');
|
||||
});
|
||||
}
|
14
tasks/build/create_empty_dirs_and_files.js
Normal file
14
tasks/build/create_empty_dirs_and_files.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('_build:createEmptyDirsAndFiles', function () {
|
||||
// force the plugins directory to exist
|
||||
grunt.file.mkdir('build/kibana/plugins');
|
||||
|
||||
// force the data directory to exist
|
||||
grunt.file.mkdir('build/kibana/data');
|
||||
|
||||
// When running from built packages, if a plugin is installed before babelcache
|
||||
// exists it can become owned by root. This causes server startup to fail because
|
||||
// the optimization process can't write to .babelcache.json.
|
||||
grunt.file.write('build/kibana/optimize/.babelcache.json', '{}\n');
|
||||
});
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
export default function (grunt) {
|
||||
grunt.registerTask('_build:data', function () {
|
||||
grunt.file.mkdir('build/kibana/data');
|
||||
});
|
||||
}
|
|
@ -10,14 +10,10 @@ module.exports = function (grunt) {
|
|||
'_build:downloadNodeBuilds',
|
||||
'_build:extractNodeBuilds',
|
||||
'copy:devSource',
|
||||
'clean:devSourceForTestbed',
|
||||
'babel:build',
|
||||
'_build:plugins',
|
||||
'_build:data',
|
||||
'_build:verifyTranslations',
|
||||
'_build:createEmptyDirsAndFiles',
|
||||
'_build:packageJson',
|
||||
'_build:readme',
|
||||
'_build:babelCache',
|
||||
'_build:packages',
|
||||
'_build:installDependencies',
|
||||
'clean:packages',
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('_build:plugins', function () {
|
||||
grunt.file.mkdir('build/kibana/plugins');
|
||||
});
|
||||
};
|
|
@ -4,7 +4,6 @@ module.exports = function () {
|
|||
target: 'target',
|
||||
testsFromModules: 'build/kibana/node_modules/**/{test,tests}/**',
|
||||
examplesFromModules: 'build/kibana/node_modules/**/{example,examples}/**',
|
||||
devSourceForTestbed: 'build/kibana/src/core_plugins/testbed/',
|
||||
packages: 'build/kibana/packages'
|
||||
};
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@ module.exports = function () {
|
|||
'!src/fixtures/**',
|
||||
'!src/core_plugins/dev_mode/**',
|
||||
'!src/core_plugins/tests_bundle/**',
|
||||
'!src/core_plugins/testbed/**',
|
||||
'!src/core_plugins/console/public/tests/**',
|
||||
'!src/cli/cluster/**',
|
||||
'!src/ui_framework/doc_site/**',
|
||||
|
|
|
@ -41,7 +41,7 @@ module.exports = function (grunt) {
|
|||
'test:jest',
|
||||
'test:browser-ci',
|
||||
'test:api',
|
||||
'_build:verifyTranslations',
|
||||
'verifyTranslations',
|
||||
]);
|
||||
|
||||
grunt.config.set('functional_test_runner.functional.options.configOverrides.mochaOpts.bail', true);
|
||||
|
|
|
@ -99,7 +99,8 @@ module.exports = function (grunt) {
|
|||
grunt.task.run(_.compact([
|
||||
!grunt.option('quick') && 'run:eslint',
|
||||
'licenses',
|
||||
'test:quick'
|
||||
'test:quick',
|
||||
'verifyTranslations',
|
||||
]));
|
||||
});
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import { fromRoot, formatListAsProse } from '../../src/utils';
|
||||
import * as i18nVerify from '../utils/i18n_verify_keys';
|
||||
import { fromRoot, formatListAsProse } from '../src/utils';
|
||||
import { findPluginSpecs } from '../src/plugin_discovery';
|
||||
import { collectUiExports } from '../src/ui';
|
||||
import { I18n } from '../src/ui/ui_i18n/i18n';
|
||||
|
||||
import { findPluginSpecs } from '../../src/plugin_discovery';
|
||||
import { collectUiExports } from '../../src/ui';
|
||||
import { I18n } from '../../src/ui/ui_i18n/i18n';
|
||||
import * as i18nVerify from './utils/i18n_verify_keys';
|
||||
|
||||
export default function (grunt) {
|
||||
grunt.registerTask('_build:verifyTranslations', async function () {
|
||||
grunt.registerTask('verifyTranslations', async function () {
|
||||
const done = this.async();
|
||||
|
||||
try {
|
Loading…
Add table
Add a link
Reference in a new issue