windows golang chmod for deploy func -f too

This commit is contained in:
Daniel Schep 2019-02-08 12:42:05 -05:00
parent eb4944108e
commit 7c73fdff37

View File

@ -123,9 +123,16 @@ module.exports = {
}
const zipFileName = `${functionName}.zip`;
const filesToChmodPlusX = []
if (process.platfrom === 'win32') {
const runtime = functionName.runtime || this.serverless.service.provider.runtime;
if (runtime).startsWith('go') {
filesToChmodPlusX.push(functionObject.handler)
}
}
return this.resolveFilePathsFunction(functionName).then(filePaths =>
this.zipFiles(filePaths, zipFileName).then(artifactPath => {
this.zipFiles(filePaths, zipFileName, undefined, filesToChmodPlusX).then(artifactPath => {
functionObject.package = {
artifact: artifactPath,
};