kibana/tasks/rebuild/extract_zips.js
Court Ewing 834f56392e Apply -snapshot suffix during build task
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`.
2016-06-11 15:57:30 -04:00

14 lines
417 B
JavaScript

import { execFileSync } from 'child_process';
export default (grunt) => {
grunt.registerTask('_rebuild:extractZips', function () {
const buildDir = grunt.config.get('buildDir');
const targetDir = grunt.config.get('target');
const zips = grunt.file.expand({ cwd: targetDir }, '*.zip');
zips.forEach(zip => {
execFileSync('unzip', [zip, '-d', buildDir], { cwd: targetDir });
});
});
};