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

55 lines
1.6 KiB

"use strict";
import { GenericTask, TaskInfo } from "../types";
import dotnetcheckstyle from "./dotnetcheckstyle";
import dotnetcompile from "./dotnetcompile";
import dotnetnugetrestore from "./dotnetnugetrestore";
import dotnetrewrite from "./dotnetrewrite";
import sequential from "./sequential";
interface IDotNetBuilderWithoutCleanupParameters {
readonly skipMbsCheckStyle?: boolean;
readonly forceCodeAnalysis?: boolean;
readonly ignoreCodeAnalysis?: boolean;
readonly skipCodeAnalysis: boolean;
readonly skipCodeSigning?: boolean;
readonly skipNugetRestore?: boolean;
readonly configuration: string;
readonly solution: string;
readonly ignoreCodeStyle: boolean;
}
const createTasks = function *(params: IDotNetBuilderWithoutCleanupParameters) {
if (!params.skipMbsCheckStyle) {
yield {
name: "dotnetcheckstyle",
task: dotnetcheckstyle(params),
} as TaskInfo;
}
yield {
name: "dotnetrewrite",
task: dotnetrewrite(params),
} as TaskInfo;
if (!params.skipNugetRestore) {
yield {
name: "dotnetnugetrestore",
task: dotnetnugetrestore(params),
} as TaskInfo;
}
yield {
name: "dotnetcompile",
task: dotnetcompile({
...params,
8 years ago
target: "Rebuild",
}),
} as TaskInfo;
};
export default ((params) => (processor) => {
const tasks = Array.from(createTasks(params)) as TaskInfo[];
return sequential({ tasks })(processor);
}) as GenericTask<IDotNetBuilderWithoutCleanupParameters>;