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/dotnetcompile.ts

42 lines
1.3 KiB

"use strict";
import { join } from "path";
import * as _ from "underscore";
import { Settings, Task } from "../types";
import dotnetbuilderwrapper from "./dotnetbuilderwrapper";
8 years ago
export default ((params, processor) => {
if (processor.settings.isCodeAnalysisUnsupported && params.forceCodeAnalysis) {
processor.onError("Code analysis is not supported");
return processor.done();
}
const getAdditionalSigningParameters = () => {
if (processor.settings.skipCodeSigning || params.skipCodeSigning) {
return {};
}
return { SigningKey: processor.settings.codeSigningKeyFile };
};
const skipCodeAnalysis = processor.settings.isCodeAnalysisUnsupported
|| params.ignoreCodeAnalysis
|| (processor.settings.ignoreCodeAnalysisByDefault && !params.forceCodeAnalysis);
const compileParams = {
8 years ago
Configuration: params.configuration,
OutputDirectory: params.overrideOutputDirectory,
SkipCodeAnalysis: skipCodeAnalysis,
SolutionPath: join(processor.context.exported, params.solution),
Target: params.target,
command: "compile",
};
return dotnetbuilderwrapper({
...compileParams,
...getAdditionalSigningParameters(),
}, processor);
8 years ago
}) as Task;