parent
c54d004d72
commit
bec09d8c9f
@ -1,9 +1,9 @@ |
||||
"use strict"; |
||||
|
||||
export default (params, processor) => { |
||||
export default ((params, processor) => { |
||||
const condition = (!params.owner || params.owner === processor.context.owner) |
||||
&& (!params.branch || params.branch === processor.context.branch || `refs/heads/${params.branch}` === processor.context.branch); |
||||
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"; |
||||
|
||||
import { join } from "path"; |
||||
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; |
||||
|
||||
import settings from "../../settings"; |
||||
import dotnetbuilderwrapper from "./dotnetbuilderwrapper"; |
||||
|
||||
export default (params, processor) => dotnetbuilderwrapper({ |
||||
"ApiKey": settings.nugetApiKey, |
||||
"NugetHost": settings.nugetHost, |
||||
"Package": join(processor.context.exported, params.Package), |
||||
"command": "nugetpush" |
||||
}, processor); |
||||
export default ((params, processor) => dotnetbuilderwrapper({ |
||||
ApiKey: settings.nugetApiKey, |
||||
NugetHost: settings.nugetHost, |
||||
Package: join(processor.context.exported, params.Package), |
||||
command: "nugetpush", |
||||
}, processor)) as Task; |
||||
|
@ -1,50 +1,47 @@ |
||||
"use strict"; |
||||
|
||||
import { join } from "path"; |
||||
import { readFileSync } from "fs"; |
||||
import { render } from "mustache"; |
||||
import { join } from "path"; |
||||
import sequential from "./sequential"; |
||||
|
||||
// eslint-disable-next-line no-sync
|
||||
const msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { "encoding": "utf8" }); |
||||
// eslint-disable-next-line no-sync
|
||||
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 msbuildTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.msbuild"), { encoding: "utf8" }); |
||||
const deployTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.bat"), { encoding: "utf8" }); |
||||
const versionTemplate = readFileSync(join(__dirname, "/dotnetpackwebapp.template.version.aspx"), { encoding: "utf8" }); |
||||
|
||||
export default (params, processor) => sequential({ |
||||
"tasks": [ |
||||
export default ((params, processor) => sequential({ |
||||
tasks: [ |
||||
{ |
||||
"params": { |
||||
"data": render(msbuildTemplate, params), |
||||
"filename": "MakePackage.msbuild" |
||||
params: { |
||||
data: render(msbuildTemplate, params), |
||||
filename: "MakePackage.msbuild", |
||||
}, |
||||
"type": "writefile" |
||||
type: "writefile", |
||||
}, |
||||
{ |
||||
"params": { |
||||
"data": render(deployTemplate, params), |
||||
"filename": "Deploy.bat" |
||||
params: { |
||||
data: render(deployTemplate, params), |
||||
filename: "Deploy.bat", |
||||
}, |
||||
"type": "writefile" |
||||
type: "writefile", |
||||
}, |
||||
{ |
||||
"params": { |
||||
"data": render(versionTemplate, params), |
||||
"filename": "version.aspx" |
||||
params: { |
||||
data: render(versionTemplate, params), |
||||
filename: "version.aspx", |
||||
}, |
||||
"type": "writefile" |
||||
type: "writefile", |
||||
}, |
||||
{ |
||||
"params": { |
||||
"configuration": params.configuration, |
||||
"isCodeAnalysisUnsupported": params.isCodeAnalysisUnsupported, |
||||
"overrideOutputDirectory": processor.context.release, |
||||
"skipCodeSigning": params.skipCodeSigning, |
||||
"solution": "MakePackage.msbuild", |
||||
"target": "Package" |
||||
params: { |
||||
configuration: params.configuration, |
||||
isCodeAnalysisUnsupported: params.isCodeAnalysisUnsupported, |
||||
overrideOutputDirectory: processor.context.release, |
||||
skipCodeSigning: params.skipCodeSigning, |
||||
solution: "MakePackage.msbuild", |
||||
target: "Package", |
||||
}, |
||||
"type": "dotnetcompile" |
||||
} |
||||
] |
||||
}, processor); |
||||
type: "dotnetcompile", |
||||
}, |
||||
], |
||||
}, processor)) as Task; |
||||
|
@ -1,3 +1,3 @@ |
||||
"use strict"; |
||||
|
||||
export default (params, processor) => ({ "process": () => processor.done() }); |
||||
export default ((params, processor) => ({ process: () => processor.done() })) as Task; |
||||
|
@ -1,101 +1,10 @@ |
||||
{ |
||||
"jsRules": { |
||||
"class-name": true, |
||||
"comment-format": [ |
||||
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" |
||||
] |
||||
}, |
||||
"extends": [ |
||||
"tslint:latest", |
||||
"tslint-eslint-rules" |
||||
], |
||||
"rules": { |
||||
"class-name": true, |
||||
"comment-format": [ |
||||
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" |
||||
] |
||||
"no-console": false, |
||||
"max-line-length": false |
||||
} |
||||
} |
Loading…
Reference in new issue