parent
c54d004d72
commit
bec09d8c9f
@ -1,9 +1,9 @@ |
|||||||
"use strict"; |
"use strict"; |
||||||
|
|
||||||
export default (params, processor) => { |
export default ((params, processor) => { |
||||||
const condition = (!params.owner || params.owner === processor.context.owner) |
const condition = (!params.owner || params.owner === processor.context.owner) |
||||||
&& (!params.branch || params.branch === processor.context.branch || `refs/heads/${params.branch}` === processor.context.branch); |
&& (!params.branch || params.branch === processor.context.branch || `refs/heads/${params.branch}` === processor.context.branch); |
||||||
const task = (condition && params.task) || params.otherwise; |
const task = (condition && params.task) || params.otherwise; |
||||||
|
|
||||||
return { "process": () => processor.processTask(task || { "type": "noop" }, processor.done.bind(processor)) }; |
return { process: () => processor.processTask(task || { type: "noop" }, processor.done.bind(processor)) }; |
||||||
}; |
}) as Task; |
||||||
|
@ -1,12 +1,13 @@ |
|||||||
"use strict"; |
"use strict"; |
||||||
|
|
||||||
import { join } from "path"; |
import { join } from "path"; |
||||||
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; |
|
||||||
import settings from "../../settings"; |
import settings from "../../settings"; |
||||||
|
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; |
||||||
|
|
||||||
export default (params, processor) => dotnetbuilderwrapper({ |
export default ((params, processor) => dotnetbuilderwrapper({ |
||||||
"ApiKey": settings.nugetApiKey, |
ApiKey: settings.nugetApiKey, |
||||||
"NugetHost": settings.nugetHost, |
NugetHost: settings.nugetHost, |
||||||
"Package": join(processor.context.exported, params.Package), |
Package: join(processor.context.exported, params.Package), |
||||||
"command": "nugetpush" |
command: "nugetpush", |
||||||
}, processor); |
}, processor)) as Task; |
||||||
|
@ -1,50 +1,47 @@ |
|||||||
"use strict"; |
"use strict"; |
||||||
|
|
||||||
import { join } from "path"; |
|
||||||
import { readFileSync } from "fs"; |
import { readFileSync } from "fs"; |
||||||
import { render } from "mustache"; |
import { render } from "mustache"; |
||||||
|
import { join } from "path"; |
||||||
import sequential from "./sequential"; |
import sequential from "./sequential"; |
||||||
|
|
||||||
// eslint-disable-next-line no-sync
|
const msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { encoding: "utf8" }); |
||||||
const msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { "encoding": "utf8" }); |
const deployTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.bat"), { encoding: "utf8" }); |
||||||
// eslint-disable-next-line no-sync
|
const versionTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.version.aspx"), { encoding: "utf8" }); |
||||||
const deployTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.bat"), { "encoding": "utf8" }); |
|
||||||
// eslint-disable-next-line no-sync
|
|
||||||
const versionTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.version.aspx"), { "encoding": "utf8" }); |
|
||||||
|
|
||||||
export default (params, processor) => sequential({ |
export default ((params, processor) => sequential({ |
||||||
"tasks": [ |
tasks: [ |
||||||
{ |
{ |
||||||
"params": { |
params: { |
||||||
"data": render(msbuildTemplate, params), |
data: render(msbuildTemplate, params), |
||||||
"filename": "MakePackage.msbuild" |
filename: "MakePackage.msbuild", |
||||||
}, |
}, |
||||||
"type": "writefile" |
type: "writefile", |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"params": { |
params: { |
||||||
"data": render(deployTemplate, params), |
data: render(deployTemplate, params), |
||||||
"filename": "Deploy.bat" |
filename: "Deploy.bat", |
||||||
}, |
}, |
||||||
"type": "writefile" |
type: "writefile", |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"params": { |
params: { |
||||||
"data": render(versionTemplate, params), |
data: render(versionTemplate, params), |
||||||
"filename": "version.aspx" |
filename: "version.aspx", |
||||||
}, |
}, |
||||||
"type": "writefile" |
type: "writefile", |
||||||
}, |
}, |
||||||
{ |
{ |
||||||
"params": { |
params: { |
||||||
"configuration": params.configuration, |
configuration: params.configuration, |
||||||
"isCodeAnalysisUnsupported": params.isCodeAnalysisUnsupported, |
isCodeAnalysisUnsupported: params.isCodeAnalysisUnsupported, |
||||||
"overrideOutputDirectory": processor.context.release, |
overrideOutputDirectory: processor.context.release, |
||||||
"skipCodeSigning": params.skipCodeSigning, |
skipCodeSigning: params.skipCodeSigning, |
||||||
"solution": "MakePackage.msbuild", |
solution: "MakePackage.msbuild", |
||||||
"target": "Package" |
target: "Package", |
||||||
}, |
}, |
||||||
"type": "dotnetcompile" |
type: "dotnetcompile", |
||||||
} |
}, |
||||||
] |
], |
||||||
}, processor); |
}, processor)) as Task; |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
"use strict"; |
"use strict"; |
||||||
|
|
||||||
export default (params, processor) => ({ "process": () => processor.done() }); |
export default ((params, processor) => ({ process: () => processor.done() })) as Task; |
||||||
|
@ -1,101 +1,10 @@ |
|||||||
{ |
{ |
||||||
"jsRules": { |
"extends": [ |
||||||
"class-name": true, |
"tslint:latest", |
||||||
"comment-format": [ |
"tslint-eslint-rules" |
||||||
true, |
|
||||||
"check-space" |
|
||||||
], |
], |
||||||
"indent": [ |
|
||||||
true, |
|
||||||
"spaces" |
|
||||||
], |
|
||||||
"no-duplicate-variable": true, |
|
||||||
"no-eval": true, |
|
||||||
"no-trailing-whitespace": true, |
|
||||||
"no-unsafe-finally": true, |
|
||||||
"one-line": [ |
|
||||||
true, |
|
||||||
"check-open-brace", |
|
||||||
"check-whitespace" |
|
||||||
], |
|
||||||
"quotemark": [ |
|
||||||
true, |
|
||||||
"double" |
|
||||||
], |
|
||||||
"semicolon": [ |
|
||||||
true, |
|
||||||
"always" |
|
||||||
], |
|
||||||
"triple-equals": [ |
|
||||||
true, |
|
||||||
"allow-null-check" |
|
||||||
], |
|
||||||
"variable-name": [ |
|
||||||
true, |
|
||||||
"ban-keywords" |
|
||||||
], |
|
||||||
"whitespace": [ |
|
||||||
true, |
|
||||||
"check-branch", |
|
||||||
"check-decl", |
|
||||||
"check-operator", |
|
||||||
"check-separator", |
|
||||||
"check-type" |
|
||||||
] |
|
||||||
}, |
|
||||||
"rules": { |
"rules": { |
||||||
"class-name": true, |
"no-console": false, |
||||||
"comment-format": [ |
"max-line-length": false |
||||||
true, |
|
||||||
"check-space" |
|
||||||
], |
|
||||||
"indent": [ |
|
||||||
true, |
|
||||||
"spaces" |
|
||||||
], |
|
||||||
"no-eval": true, |
|
||||||
"no-internal-module": true, |
|
||||||
"no-trailing-whitespace": true, |
|
||||||
"no-unsafe-finally": true, |
|
||||||
"no-var-keyword": true, |
|
||||||
"one-line": [ |
|
||||||
true, |
|
||||||
"check-open-brace", |
|
||||||
"check-whitespace" |
|
||||||
], |
|
||||||
"quotemark": [ |
|
||||||
true, |
|
||||||
"double" |
|
||||||
], |
|
||||||
"semicolon": [ |
|
||||||
true, |
|
||||||
"always" |
|
||||||
], |
|
||||||
"triple-equals": [ |
|
||||||
true, |
|
||||||
"allow-null-check" |
|
||||||
], |
|
||||||
"typedef-whitespace": [ |
|
||||||
true, |
|
||||||
{ |
|
||||||
"call-signature": "nospace", |
|
||||||
"index-signature": "nospace", |
|
||||||
"parameter": "nospace", |
|
||||||
"property-declaration": "nospace", |
|
||||||
"variable-declaration": "nospace" |
|
||||||
} |
|
||||||
], |
|
||||||
"variable-name": [ |
|
||||||
true, |
|
||||||
"ban-keywords" |
|
||||||
], |
|
||||||
"whitespace": [ |
|
||||||
true, |
|
||||||
"check-branch", |
|
||||||
"check-decl", |
|
||||||
"check-operator", |
|
||||||
"check-separator", |
|
||||||
"check-type" |
|
||||||
] |
|
||||||
} |
} |
||||||
} |
} |
Loading…
Reference in new issue