Build server prototype (integration with GitHub / NuGet / etc)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
micro-build-server/BuildServer/lib/tasks/copy.js

21 lines
653 B

"use strict";
const fse = require('fs-extra');
module.exports = (params, processor) => ({
process: () => {
const sourceFilePath = processor.context.exported + "/" + params.filename;
const targetFilePath = processor.context.release + "/" + params.filename;
processor.onInfo("Copying " + sourceFilePath + " to " + targetFilePath);
fse.copy(sourceFilePath, targetFilePath, (err) => {
if (err) {
processor.onError("Unable to copy file: " + err);
} else {
processor.onInfo("Copied file");
}
return processor.done();
});
}
});