parent
65f55220b2
commit
dde7044e18
@ -1,19 +1,31 @@ |
||||
"use strict"; |
||||
|
||||
import { GenericTask } from "../types"; |
||||
import cleanupafterdotnetbuild from "./cleanupafterdotnetbuild"; |
||||
import dotnetbuildwithoutcleanup from "./dotnetbuildwithoutcleanup"; |
||||
import sequential from "./sequential"; |
||||
|
||||
export default ((params, processor) => sequential({ |
||||
interface IDotNetBuildParameters { |
||||
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; |
||||
} |
||||
|
||||
export default ((params) => (processor) => sequential({ |
||||
tasks: [ |
||||
{ |
||||
name: "build", |
||||
params, |
||||
type: "dotnetbuildwithoutcleanup", |
||||
task: dotnetbuildwithoutcleanup(params), |
||||
}, |
||||
{ |
||||
name: "cleanup", |
||||
params: {}, |
||||
type: "cleanupafterdotnetbuild", |
||||
task: cleanupafterdotnetbuild({}), |
||||
}, |
||||
], |
||||
}, processor)) as GenericTask<{}>; |
||||
})(processor)) as GenericTask<IDotNetBuildParameters>; |
||||
|
@ -1,24 +1,36 @@ |
||||
"use strict"; |
||||
|
||||
import { GenericTask } from "../types"; |
||||
import cleanupafterdotnetbuild from "./cleanupafterdotnetbuild"; |
||||
import dotnetbuildwithoutcleanup from "./dotnetbuildwithoutcleanup"; |
||||
import dotnetnunitall from "./dotnetnunitall"; |
||||
import sequential from "./sequential"; |
||||
|
||||
export default ((params, processor) => sequential({ |
||||
interface IDotNetBuildAndTestParameters { |
||||
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; |
||||
} |
||||
|
||||
export default ((params) => (processor) => sequential({ |
||||
tasks: [ |
||||
{ |
||||
name: "build", |
||||
params, |
||||
type: "dotnetbuildwithoutcleanup", |
||||
task: dotnetbuildwithoutcleanup(params), |
||||
}, |
||||
{ |
||||
name: "test", |
||||
params, |
||||
type: "dotnetnunitall", |
||||
task: dotnetnunitall(params), |
||||
}, |
||||
{ |
||||
name: "cleanup", |
||||
params: {}, |
||||
type: "cleanupafterdotnetbuild", |
||||
task: cleanupafterdotnetbuild({}), |
||||
}, |
||||
], |
||||
}, processor)) as GenericTask<{}>; |
||||
})(processor)) as GenericTask<IDotNetBuildAndTestParameters>; |
||||
|
@ -1,53 +1,54 @@ |
||||
"use strict"; |
||||
|
||||
import { GenericTask } from "../types"; |
||||
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 IParameters { |
||||
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: IParameters) { |
||||
const createTasks = function *(params: IDotNetBuilderWithoutCleanupParameters) { |
||||
if (!params.skipMbsCheckStyle) { |
||||
yield { |
||||
params, |
||||
type: "dotnetcheckstyle", |
||||
}; |
||||
name: "dotnetcheckstyle", |
||||
task: dotnetcheckstyle(params), |
||||
} as TaskInfo; |
||||
} |
||||
|
||||
yield { |
||||
params, |
||||
type: "dotnetrewrite", |
||||
}; |
||||
name: "dotnetrewrite", |
||||
task: dotnetrewrite(params), |
||||
} as TaskInfo; |
||||
|
||||
if (!params.skipNugetRestore) { |
||||
yield { |
||||
params, |
||||
type: "dotnetnugetrestore", |
||||
}; |
||||
name: "dotnetnugetrestore", |
||||
task: dotnetnugetrestore(params), |
||||
} as TaskInfo; |
||||
} |
||||
|
||||
yield { |
||||
params: { |
||||
configuration: params.configuration, |
||||
forceCodeAnalysis: params.forceCodeAnalysis, |
||||
ignoreCodeAnalysis: params.ignoreCodeAnalysis, |
||||
skipCodeSigning: params.skipCodeSigning, |
||||
solution: params.solution, |
||||
name: "dotnetcompile", |
||||
task: dotnetcompile({ |
||||
...params, |
||||
target: "Rebuild", |
||||
}, |
||||
type: "dotnetcompile", |
||||
}; |
||||
}), |
||||
} as TaskInfo; |
||||
}; |
||||
|
||||
export default ((params, processor) => { |
||||
const tasks = Array.from(createTasks(params)); |
||||
|
||||
return sequential({ tasks }, processor); |
||||
}) as GenericTask<IParameters>; |
||||
export default ((params) => (processor) => { |
||||
const tasks = Array.from(createTasks(params)) as TaskInfo[]; |
||||
return sequential({ tasks })(processor); |
||||
}) as GenericTask<IDotNetBuilderWithoutCleanupParameters>; |
||||
|
@ -1,17 +1,21 @@ |
||||
"use strict"; |
||||
|
||||
import { GenericTask } from "../types"; |
||||
import copy from "./copy"; |
||||
import dotnetnugetprocessinternal from "./dotnetnugetprocessinternal"; |
||||
|
||||
interface IParameters { |
||||
interface IDotNetNuGetPackParameters { |
||||
readonly withoutCommitSha?: boolean; |
||||
readonly major?: string; |
||||
readonly version?: string; |
||||
readonly name: string; |
||||
readonly nuspec: string; |
||||
} |
||||
|
||||
export default ((params, processor) => dotnetnugetprocessinternal({ |
||||
export default ((params) => (processor) => dotnetnugetprocessinternal({ |
||||
...params, |
||||
getFinalTask: (nupkg) => ({ |
||||
params: { filename: nupkg }, |
||||
type: "copy", |
||||
name: "copynupkg", |
||||
task: copy({ filename: nupkg }), |
||||
}), |
||||
}, processor)) as GenericTask<IParameters>; |
||||
})(processor)) as GenericTask<IDotNetNuGetPackParameters>; |
||||
|
@ -1,39 +1,44 @@ |
||||
"use strict"; |
||||
|
||||
import { GenericTask } from "../types"; |
||||
import cssnanoall from "./cssnanoall"; |
||||
import eslintbrowserall from "./eslintbrowserall"; |
||||
import sequential from "./sequential"; |
||||
import uglifyjsall from "./uglifyjsall"; |
||||
import writefile from "./writefile"; |
||||
import zip from "./zip"; |
||||
|
||||
interface IParameters { |
||||
readonly eslintExcludeFiles: boolean; |
||||
readonly eslintExcludeFiles?: string[]; |
||||
} |
||||
|
||||
export default ((params, processor) => sequential({ |
||||
export default ((params) => (processor) => sequential({ |
||||
tasks: [ |
||||
{ |
||||
params: { excludeFiles: params.eslintExcludeFiles }, |
||||
type: "eslintbrowserall", |
||||
name: "eslint", |
||||
task: eslintbrowserall({ excludeFiles: params.eslintExcludeFiles }), |
||||
}, |
||||
{ |
||||
params: { }, |
||||
type: "uglifyjsall", |
||||
name: "uglifyjs", |
||||
task: uglifyjsall({}), |
||||
}, |
||||
{ |
||||
params: { }, |
||||
type: "cssnanoall", |
||||
name: "cssnano", |
||||
task: cssnanoall({}), |
||||
}, |
||||
{ |
||||
params: { |
||||
name: "writeversion", |
||||
task: writefile({ |
||||
data: processor.context.versionInfo, |
||||
filename: "version.txt", |
||||
}, |
||||
type: "writefile", |
||||
}), |
||||
}, |
||||
{ |
||||
params: { |
||||
name: "zip", |
||||
task: zip({ |
||||
archive: `${processor.context.reponame}.zip`, |
||||
directory: "", |
||||
}, |
||||
type: "zip", |
||||
}), |
||||
}, |
||||
], |
||||
}, processor)) as GenericTask<IParameters>; |
||||
})(processor)) as GenericTask<IParameters>; |
||||
|
Loading…
Reference in new issue