parent
68fea460ad
commit
f24e6f7163
@ -1,35 +1,37 @@ |
|||||||
"use strict"; |
"use strict"; |
||||||
|
|
||||||
const path = require("path"); |
const path = require("path"); |
||||||
|
const _ = require("underscore"); |
||||||
const settings = require("../../settings"); |
const settings = require("../../settings"); |
||||||
const dotnetbuilderwrapper = require("./dotnetbuilderwrapper"); |
const dotnetbuilderwrapper = require("./dotnetbuilderwrapper"); |
||||||
|
|
||||||
module.exports = (params, processor) => { |
module.exports = (params, processor) => { |
||||||
const compileParams = { |
|
||||||
"Configuration": params.configuration, |
|
||||||
"OutputDirectory": params.overrideOutputDirectory, |
|
||||||
"SolutionPath": path.join(processor.context.exported, params.solution), |
|
||||||
"Target": params.target, |
|
||||||
"command": "compile" |
|
||||||
}; |
|
||||||
|
|
||||||
if (!settings.skipCodeSigning && !params.skipCodeSigning) { |
|
||||||
compileParams.SigningKey = settings.codeSigningKeyFile; |
|
||||||
} |
|
||||||
|
|
||||||
if (settings.isCodeAnalysisUnsupported && params.forceCodeAnalysis) { |
if (settings.isCodeAnalysisUnsupported && params.forceCodeAnalysis) { |
||||||
processor.onError("Code analysis is not supported"); |
processor.onError("Code analysis is not supported"); |
||||||
|
|
||||||
return processor.done(); |
return processor.done(); |
||||||
} |
} |
||||||
|
|
||||||
if ( |
const getAdditionalSigningParameters = () => { |
||||||
settings.isCodeAnalysisUnsupported |
if (settings.skipCodeSigning || params.skipCodeSigning) { |
||||||
|| params.ignoreCodeAnalysis |
return {}; |
||||||
|| (settings.ignoreCodeAnalysisByDefault && !params.forceCodeAnalysis) |
|
||||||
) { |
|
||||||
compileParams.SkipCodeAnalysis = true; |
|
||||||
} |
} |
||||||
|
|
||||||
return dotnetbuilderwrapper(compileParams, processor); |
return { "SigningKey": settings.codeSigningKeyFile }; |
||||||
|
}; |
||||||
|
|
||||||
|
const skipCodeAnalysis = settings.isCodeAnalysisUnsupported |
||||||
|
|| params.ignoreCodeAnalysis |
||||||
|
|| (settings.ignoreCodeAnalysisByDefault && !params.forceCodeAnalysis); |
||||||
|
|
||||||
|
const compileParams = { |
||||||
|
"Configuration": params.configuration, |
||||||
|
"OutputDirectory": params.overrideOutputDirectory, |
||||||
|
"SkipCodeAnalysis": skipCodeAnalysis, |
||||||
|
"SolutionPath": path.join(processor.context.exported, params.solution), |
||||||
|
"Target": params.target, |
||||||
|
"command": "compile" |
||||||
|
}; |
||||||
|
|
||||||
|
return dotnetbuilderwrapper(_.extend(compileParams, getAdditionalSigningParameters()), processor); |
||||||
}; |
}; |
||||||
|
Loading…
Reference in new issue