UNPKG

@spalger/kibana

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

25 lines (20 loc) 654 B
var childProcess = require('child_process'); var Promise = require('bluebird'); var fs = require('fs'); var readdir = Promise.promisify(fs.readdir); var exec = Promise.promisify(childProcess.exec); var _ = require('lodash'); module.exports = function (grunt) { grunt.registerTask('create_shasums', function () { var targetDir = grunt.config.get('target'); readdir(targetDir) .map(function (archive) { // only sha the archives if (!archive.match(/\.zip$|\.tar.gz$/)) return; return exec('shasum ' + archive + ' > ' + archive + '.sha1.txt', { cwd: targetDir }); }) .nodeify(this.async()); }); };