mirror of
https://github.com/elastic/kibana.git
synced 2025-04-21 16:29:04 -04:00
* [codeshift] add proper ignore comments * [codeshift] apply require-to-import transform * [codeshift/fixup] remove duplicate imports * [eslint] upgrade config for react "unused" support * [codeshift] apply remove-unused-imports transform * [codeshift] apply remove-unused-basic-requires transform * [codeshift] apply remove-unused-function-arguments transform * [lintroller] fix argument list spacing * [codeshift] apply remove-unused-basic-bars transform * [codeshift/fixup] fixup unused basic var removals * manually apply remove-unused-assignments transform * [codeshift] reapply remove-unused-imports transform * [codeshift] reapply remove-unused-function-arguments transform * [eslint] autofix param spacing * manually fix remaining no-undef errors * use more descriptive file ignore pattern * add eslint-plugin-react peerDependency * replace values that looked unused in tests * remove // kibana-jscodeshift-no-babel comment * remove import statements from code required by api tests * Remove '// kibana-jscodeshift-ignore' comments * address review feedback * remove remnant of removed if condition
26 lines
799 B
JavaScript
26 lines
799 B
JavaScript
import { promisify } from 'bluebird';
|
|
const readdir = promisify(require('fs').readdir);
|
|
const exec = promisify(require('child_process').exec);
|
|
const platform = require('os').platform();
|
|
const cmd = /^win/.test(platform) ? 'sha1sum ' : 'shasum ';
|
|
|
|
module.exports = function (grunt) {
|
|
grunt.registerTask('_build:shasums', function () {
|
|
const targetDir = grunt.config.get('target');
|
|
|
|
// for when shasums is run but archives and ospackages was not
|
|
grunt.file.mkdir(targetDir);
|
|
|
|
readdir(targetDir)
|
|
.map(function (archive) {
|
|
// only sha the archives and packages
|
|
if (!archive.match(/\.zip$|\.tar.gz$|\.deb$|\.rpm$/)) return;
|
|
|
|
return exec(cmd + archive + ' > ' + archive + '.sha1.txt', {
|
|
cwd: targetDir
|
|
});
|
|
})
|
|
.nodeify(this.async());
|
|
});
|
|
|
|
};
|