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