shipit-secrets/prep.js

14 lines
464 B
JavaScript
Raw Permalink Normal View History

2016-06-09 21:13:33 +00:00
const utils = require("shipit-utils");
const chalk = require("chalk");
module.exports = function (gruntOrShipit, shipit, secretsConfig) {
utils.registerTask(gruntOrShipit, "secrets:prep", () => Promise.all(_(secretsConfig.files).map(removeFile).toArray()).then(() => {
shipit.log(chalk.green("Secrets prepped."));
return shipit.emit("secrets:prepped");
}));
function removeFile(source, target) {
return shipit.remote(`rm -f ${target}`);
}
};