kuduscript
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -21,8 +21,8 @@ var commander = require('commander'); | ||
.option('--python', 'Create a deployment script for python website') | ||
.option('--functionApp', 'Create a deployment script for function App') | ||
.option('--functionApp [projectFilePath]', 'Create a deployment script for function App, specify the project file path if using msbuild') | ||
.option('--basic', 'Create a deployment script for any other website') | ||
.option('--dotNetConsole <projectFilePath>', 'Create a deployment script for .NET console application, specify the project file path') | ||
.option('-s, --solutionFile [file path]', 'The solution file path (sln)') | ||
.option('-p, --sitePath [directory path]', 'The path to the site being deployed (default: same as repositoryRoot)') | ||
.option('-t, --scriptType [batch|bash|posh]', 'The script output type (default: batch)') | ||
.option('-s, --solutionFile <file path>', 'The solution file path (sln)') | ||
.option('-p, --sitePath <directory path>', 'The path to the site being deployed (default: same as repositoryRoot)') | ||
.option('-t, --scriptType <batch|bash|posh>', 'The script output type (default: batch)') | ||
.option('-o, --outputPath <output path>', 'The path to output generated script (default: same as repository root)') | ||
@@ -34,2 +34,8 @@ .option('-y, --suppressPrompt', 'Suppresses prompting to confirm you want to overwrite an existing destination file.') | ||
function tryOptionalInput(argument){ | ||
// if argument == true, means option is specified, but optional input IS NOT provided | ||
// if argument != true, value of its optional input is stored in argument | ||
return argument === true ? undefined : argument; | ||
} | ||
function deploymentScriptExecute(name, options, log, confirm, _) { | ||
@@ -39,3 +45,3 @@ var repositoryRoot = options.repositoryRoot || '.'; | ||
var scriptType = options.scriptType; | ||
var projectFile = options.aspWAP || options.dotNetConsole || options.aspNetCore; | ||
var projectFile = options.aspWAP || options.dotNetConsole || options.aspNetCore || tryOptionalInput(options.functionApp); | ||
var solutionFile = options.solutionFile; | ||
@@ -42,0 +48,0 @@ var sitePath = options.sitePath || repositoryRoot; |
@@ -144,35 +144,31 @@ /*** Generated by streamline 0.4.11 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb; var package = require("../package.json"); | ||
function generateDnxConsoleAppDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateDnxConsoleAppDeploymentScript", line: 144 }; return __func(_, this, arguments, generateDnxConsoleAppDeploymentScript, 1, __frame, function __$generateDnxConsoleAppDeploymentScript() { | ||
return scriptGenerator.generateDnxConsoleAppDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateDotNetConsoleDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateDotNetConsoleDeploymentScript", line: 148 }; return __func(_, this, arguments, generateDotNetConsoleDeploymentScript, 1, __frame, function __$generateDotNetConsoleDeploymentScript() { | ||
function generateDotNetConsoleDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateDotNetConsoleDeploymentScript", line: 144 }; return __func(_, this, arguments, generateDotNetConsoleDeploymentScript, 1, __frame, function __$generateDotNetConsoleDeploymentScript() { | ||
return scriptGenerator.generateDotNetConsoleDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateWapDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateWapDeploymentScript", line: 152 }; return __func(_, this, arguments, generateWapDeploymentScript, 1, __frame, function __$generateWapDeploymentScript() { | ||
function generateWapDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateWapDeploymentScript", line: 148 }; return __func(_, this, arguments, generateWapDeploymentScript, 1, __frame, function __$generateWapDeploymentScript() { | ||
return scriptGenerator.generateWapDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateWebSiteDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateWebSiteDeploymentScript", line: 156 }; return __func(_, this, arguments, generateWebSiteDeploymentScript, 1, __frame, function __$generateWebSiteDeploymentScript() { | ||
function generateWebSiteDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateWebSiteDeploymentScript", line: 152 }; return __func(_, this, arguments, generateWebSiteDeploymentScript, 1, __frame, function __$generateWebSiteDeploymentScript() { | ||
return scriptGenerator.generateWebSiteDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateNodeDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateNodeDeploymentScript", line: 160 }; return __func(_, this, arguments, generateNodeDeploymentScript, 1, __frame, function __$generateNodeDeploymentScript() { | ||
function generateNodeDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateNodeDeploymentScript", line: 156 }; return __func(_, this, arguments, generateNodeDeploymentScript, 1, __frame, function __$generateNodeDeploymentScript() { | ||
return scriptGenerator.generateNodeDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generatePythonDeploymentScript(scriptGenerator, _) { var __frame = { name: "generatePythonDeploymentScript", line: 164 }; return __func(_, this, arguments, generatePythonDeploymentScript, 1, __frame, function __$generatePythonDeploymentScript() { | ||
function generatePythonDeploymentScript(scriptGenerator, _) { var __frame = { name: "generatePythonDeploymentScript", line: 160 }; return __func(_, this, arguments, generatePythonDeploymentScript, 1, __frame, function __$generatePythonDeploymentScript() { | ||
return scriptGenerator.generatePythonDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateRubyDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateRubyDeploymentScript", line: 168 }; return __func(_, this, arguments, generateRubyDeploymentScript, 1, __frame, function __$generateRubyDeploymentScript() { | ||
function generateRubyDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateRubyDeploymentScript", line: 164 }; return __func(_, this, arguments, generateRubyDeploymentScript, 1, __frame, function __$generateRubyDeploymentScript() { | ||
return scriptGenerator.generateRubyDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generatePHPDeploymentScript(scriptGenerator, _) { var __frame = { name: "generatePHPDeploymentScript", line: 172 }; return __func(_, this, arguments, generatePHPDeploymentScript, 1, __frame, function __$generatePHPDeploymentScript() { | ||
function generatePHPDeploymentScript(scriptGenerator, _) { var __frame = { name: "generatePHPDeploymentScript", line: 168 }; return __func(_, this, arguments, generatePHPDeploymentScript, 1, __frame, function __$generatePHPDeploymentScript() { | ||
return scriptGenerator.generatePHPDeploymentScript(__cb(_, __frame, 1, 2, _, true)); });}; | ||
function generateBasicWebSiteDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateBasicWebSiteDeploymentScript", line: 176 }; return __func(_, this, arguments, generateBasicWebSiteDeploymentScript, 1, __frame, function __$generateBasicWebSiteDeploymentScript() { | ||
function generateBasicWebSiteDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateBasicWebSiteDeploymentScript", line: 172 }; return __func(_, this, arguments, generateBasicWebSiteDeploymentScript, 1, __frame, function __$generateBasicWebSiteDeploymentScript() { | ||
if (scriptGenerator.solutionPath) { | ||
@@ -184,7 +180,7 @@ return _(new Error("Solution path is not supported with this website type")); } ; | ||
function generateFunctionAppDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateFunctionAppDeploymentScript", line: 183 }; return __func(_, this, arguments, generateFunctionAppDeploymentScript, 1, __frame, function __$generateFunctionAppDeploymentScript() { | ||
function generateFunctionAppDeploymentScript(scriptGenerator, _) { var __frame = { name: "generateFunctionAppDeploymentScript", line: 179 }; return __func(_, this, arguments, generateFunctionAppDeploymentScript, 1, __frame, function __$generateFunctionAppDeploymentScript() { | ||
return scriptGenerator.generateFunctionAppDeploymentScript(__cb(_, __frame, 1, 4, _, true)); });}; | ||
ScriptGenerator.prototype.generateDeploymentScript = function ScriptGenerator_prototype_generateDeploymentScript__1(_) { var generator, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDeploymentScript__1", line: 187 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDeploymentScript__1, 0, __frame, function __$ScriptGenerator_prototype_generateDeploymentScript__1() { | ||
ScriptGenerator.prototype.generateDeploymentScript = function ScriptGenerator_prototype_generateDeploymentScript__1(_) { var generator, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDeploymentScript__1", line: 183 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDeploymentScript__1, 0, __frame, function __$ScriptGenerator_prototype_generateDeploymentScript__1() { | ||
generator = __this.generators[__this.projectType]; | ||
@@ -208,3 +204,3 @@ if (!generator) { | ||
ScriptGenerator.prototype.generateGoDeploymentScript = function ScriptGenerator_prototype_generateGoDeploymentScript__2(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateGoDeploymentScript__2", line: 206 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateGoDeploymentScript__2, 0, __frame, function __$ScriptGenerator_prototype_generateGoDeploymentScript__2() { | ||
ScriptGenerator.prototype.generateGoDeploymentScript = function ScriptGenerator_prototype_generateGoDeploymentScript__2(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateGoDeploymentScript__2", line: 202 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateGoDeploymentScript__2, 0, __frame, function __$ScriptGenerator_prototype_generateGoDeploymentScript__2() { | ||
log.info("Generating deployment script for Go Web Site"); | ||
@@ -215,3 +211,3 @@ | ||
ScriptGenerator.prototype.generateNodeDeploymentScript = function ScriptGenerator_prototype_generateNodeDeploymentScript__3(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateNodeDeploymentScript__3", line: 212 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateNodeDeploymentScript__3, 0, __frame, function __$ScriptGenerator_prototype_generateNodeDeploymentScript__3() { | ||
ScriptGenerator.prototype.generateNodeDeploymentScript = function ScriptGenerator_prototype_generateNodeDeploymentScript__3(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateNodeDeploymentScript__3", line: 208 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateNodeDeploymentScript__3, 0, __frame, function __$ScriptGenerator_prototype_generateNodeDeploymentScript__3() { | ||
log.info("Generating deployment script for node.js Web Site"); | ||
@@ -222,9 +218,28 @@ | ||
ScriptGenerator.prototype.generateFunctionAppDeploymentScript = function ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4", line: 218 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4, 0, __frame, function __$ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4() { | ||
ScriptGenerator.prototype.generateFunctionAppDeploymentScript = function ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4", line: 214 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4, 0, __frame, function __$ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4() { | ||
log.info("Generating deployment script for function App"); | ||
return __this.generateBasicDeploymentScript("functionApp.template", __cb(_, __frame, 3, 4, _, true)); });}; | ||
options = { }; return (function __$ScriptGenerator_prototype_generateFunctionAppDeploymentScript__4(__then) { | ||
if (__this.projectPath) { | ||
if ((__this.scriptType == ScriptType.bash)) { | ||
return _(new Error("csharp function targeting dotnet core is currently not supported")); } ; | ||
ScriptGenerator.prototype.generatePythonDeploymentScript = function ScriptGenerator_prototype_generatePythonDeploymentScript__5(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePythonDeploymentScript__5", line: 224 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePythonDeploymentScript__5, 0, __frame, function __$ScriptGenerator_prototype_generatePythonDeploymentScript__5() { | ||
options.solutionPath = fixPathSeparatorToWindows(__this.solutionPath); | ||
options.projectPath = fixPathSeparatorToWindows(__this.projectPath); | ||
return __this.generateFunctionAppScript("functionmsbuild.template", options, __cb(_, __frame, 11, 4, __then, true)); } else { | ||
if ((__this.scriptType == ScriptType.bash)) { | ||
options.sitePath = fixPathSeparatorToUnix(__this.sitePath); } | ||
else { | ||
options.sitePath = fixPathSeparatorToWindows(__this.sitePath); } ; | ||
return __this.generateFunctionAppScript("functionbasic.template", options, __cb(_, __frame, 20, 4, __then, true)); } ; })(_); });}; | ||
ScriptGenerator.prototype.generatePythonDeploymentScript = function ScriptGenerator_prototype_generatePythonDeploymentScript__5(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePythonDeploymentScript__5", line: 239 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePythonDeploymentScript__5, 0, __frame, function __$ScriptGenerator_prototype_generatePythonDeploymentScript__5() { | ||
log.info("Generating deployment script for python Web Site"); | ||
@@ -239,3 +254,3 @@ | ||
ScriptGenerator.prototype.generateRubyDeploymentScript = function ScriptGenerator_prototype_generateRubyDeploymentScript__6(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateRubyDeploymentScript__6", line: 234 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateRubyDeploymentScript__6, 0, __frame, function __$ScriptGenerator_prototype_generateRubyDeploymentScript__6() { | ||
ScriptGenerator.prototype.generateRubyDeploymentScript = function ScriptGenerator_prototype_generateRubyDeploymentScript__6(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generateRubyDeploymentScript__6", line: 249 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateRubyDeploymentScript__6, 0, __frame, function __$ScriptGenerator_prototype_generateRubyDeploymentScript__6() { | ||
log.info("Generating deployment script for Ruby Web Site"); | ||
@@ -246,3 +261,3 @@ | ||
ScriptGenerator.prototype.generatePHPDeploymentScript = function ScriptGenerator_prototype_generatePHPDeploymentScript__7(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePHPDeploymentScript__7", line: 240 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePHPDeploymentScript__7, 0, __frame, function __$ScriptGenerator_prototype_generatePHPDeploymentScript__7() { | ||
ScriptGenerator.prototype.generatePHPDeploymentScript = function ScriptGenerator_prototype_generatePHPDeploymentScript__7(_) { var __this = this; var __frame = { name: "ScriptGenerator_prototype_generatePHPDeploymentScript__7", line: 255 }; return __func(_, this, arguments, ScriptGenerator_prototype_generatePHPDeploymentScript__7, 0, __frame, function __$ScriptGenerator_prototype_generatePHPDeploymentScript__7() { | ||
log.info("Generating deployment script for PHP Web Site"); | ||
@@ -253,3 +268,3 @@ | ||
ScriptGenerator.prototype.generateWapDeploymentScript = function ScriptGenerator_prototype_generateWapDeploymentScript__8(_) { var msbuildArguments, msbuildArgumentsForInPlace, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWapDeploymentScript__8", line: 246 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWapDeploymentScript__8, 0, __frame, function __$ScriptGenerator_prototype_generateWapDeploymentScript__8() { | ||
ScriptGenerator.prototype.generateWapDeploymentScript = function ScriptGenerator_prototype_generateWapDeploymentScript__8(_) { var msbuildArguments, msbuildArgumentsForInPlace, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWapDeploymentScript__8", line: 261 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWapDeploymentScript__8, 0, __frame, function __$ScriptGenerator_prototype_generateWapDeploymentScript__8() { | ||
argNotNull(__this.projectPath, "projectPath"); | ||
@@ -305,70 +320,16 @@ | ||
ScriptGenerator.prototype.generateAspNetCoreDeploymentScript = function ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9(_) { var nuget_35_renamed, nugetRestore, files, webProjFiles, msbuildArguments, dotnetpublishArguments, options, nugetOrDotnetRestore, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9", line: 297 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9, 0, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9() { | ||
ScriptGenerator.prototype.generateAspNetCoreDeploymentScript = function ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9(_) { var options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9", line: 312 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9, 0, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9() { | ||
argNotNull(__this.absoluteProjectPath, "absoluteProjectPath"); | ||
nuget_35_renamed = "nuget.exe"; | ||
nugetRestore = (nuget_35_renamed + " restore -packagesavemode nuspec"); return (function __$ScriptGenerator_prototype_generateAspNetCoreDeploymentScript__9(__then) { | ||
if ((__this.solutionPath && !(__this.projectPath.endsWith(".csproj")))) { | ||
if (fs.lstatSync(__this.absoluteProjectPath).isDirectory()) { | ||
options = { }; | ||
options.RestoreArguments = (((__this.solutionPath) ? __this.solutionPath : __this.projectPath)); | ||
options.DotnetpublishArguments = __this.projectPath; | ||
files = fs.readdirSync(__this.absoluteProjectPath); | ||
webProjFiles = files.filter(function(file) { | ||
return file.endsWith(".xproj"); }); | ||
return __this.generateAspNetCoreScript("aspnet.core.template", options, __cb(_, __frame, 9, 2, _, true)); });}; | ||
if ((webProjFiles.length != 1)) { | ||
return _(new Error(((("Expecting one xproj files but found " + webProjFiles.length) + " under") + __this.absoluteProjectPath))); } ; | ||
__this.projectPath = path.relative(__this.repositoryRoot, path.join(__this.absoluteProjectPath, webProjFiles[0])); } ; | ||
if ((__this.scriptType == ScriptType.batch)) { | ||
msbuildArguments = (("\"%DEPLOYMENT_SOURCE%\\" + __this.solutionPath) + "\" /nologo /verbosity:m /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false %SCM_BUILD_ARGS%"); | ||
dotnetpublishArguments = (("\"%DEPLOYMENT_SOURCE%\\" + __this.projectPath) + "\" /nologo /verbosity:m /t:GatherAllFilesToPublish /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false;PublishOutputPathNoTrailingSlash=\"%DEPLOYMENT_TEMP%\" %SCM_BUILD_ARGS%"); } | ||
else { | ||
msbuildArguments = (("\"$DEPLOYMENT_SOURCE\\" + __this.solutionPath) + "\" /nologo /verbosity:m /p:AutoParameterizationWebConfigConnectionStrings=false`;Configuration=Release`;UseSharedCompilation=false` $SCM_BUILD_ARGS"); | ||
dotnetpublishArguments = (("\"$DEPLOYMENT_SOURCE\\" + __this.projectPath) + "\" /nologo /verbosity:m /t:GatherAllFilesToPublish /p:AutoParameterizationWebConfigConnectionStrings=false`;Configuration=Release`;UseSharedCompilation=false`;PublishOutputPathNoTrailingSlash=\"$DEPLOYMENT_TEMP\" $SCM_BUILD_ARGS"); } ; | ||
options = { | ||
msbuildArguments: msbuildArguments, | ||
dotnetpublishArguments: dotnetpublishArguments, | ||
restore: nugetRestore, | ||
solutionPath: __this.solutionPath }; | ||
return __this.generateAspNetCoreScript("aspnet.core.msbuild.template", options, __cb(_, __frame, 38, 4, __then, true)); } else { | ||
nugetOrDotnetRestore = (__this.projectPath.endsWith(".csproj") ? "dotnet restore" : nugetRestore); | ||
if (__this.solutionPath) { | ||
nugetOrDotnetRestore += ((" \"" + __this.solutionPath) + "\""); } | ||
else { | ||
nugetOrDotnetRestore += ((" \"" + __this.projectPath) + "\""); } ; | ||
return __this.generateAspNetCoreScript("aspnet.core.template", { aspNetCoreProject: __this.projectPath, restore: nugetOrDotnetRestore }, __cb(_, __frame, 49, 4, __then, true)); } ; })(_); });}; | ||
ScriptGenerator.prototype.generateDnxConsoleAppDeploymentScript = function ScriptGenerator_prototype_generateDnxConsoleAppDeploymentScript__10(_) { var options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDnxConsoleAppDeploymentScript__10", line: 350 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDnxConsoleAppDeploymentScript__10, 0, __frame, function __$ScriptGenerator_prototype_generateDnxConsoleAppDeploymentScript__10() { | ||
if ((__this.scriptType != ScriptType.batch)) { | ||
return _(new Error("Only batch script files are supported for DNX Console Application")); } ; | ||
log.info("Generating deployment script for DNX Console Application"); | ||
options = { | ||
dnxConsoleAppPath: __this.dnxConsoleAppPath }; | ||
return __this.generateDnxConsoleAppScript("deploy.batch.dnx.consoleapp.template", options, __cb(_, __frame, 11, 2, _, true)); });}; | ||
ScriptGenerator.prototype.generateDotNetConsoleDeploymentScript = function ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__11(_) { var msbuildArguments, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__11", line: 364 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__11, 0, __frame, function __$ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__11() { | ||
ScriptGenerator.prototype.generateDotNetConsoleDeploymentScript = function ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10(_) { var msbuildArguments, solutionDir, solutionArgs, options, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10", line: 325 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10, 0, __frame, function __$ScriptGenerator_prototype_generateDotNetConsoleDeploymentScript__10() { | ||
argNotNull(__this.projectPath, "projectPath"); | ||
@@ -418,3 +379,3 @@ | ||
ScriptGenerator.prototype.generateWebSiteDeploymentScript = function ScriptGenerator_prototype_generateWebSiteDeploymentScript__12(_) { var msbuildArguments, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWebSiteDeploymentScript__12", line: 409 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWebSiteDeploymentScript__12, 0, __frame, function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__12() { return (function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__12(__then) { | ||
ScriptGenerator.prototype.generateWebSiteDeploymentScript = function ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(_) { var msbuildArguments, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateWebSiteDeploymentScript__11", line: 370 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateWebSiteDeploymentScript__11, 0, __frame, function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11() { return (function __$ScriptGenerator_prototype_generateWebSiteDeploymentScript__11(__then) { | ||
if (__this.solutionPath) { | ||
@@ -431,5 +392,5 @@ | ||
if ((__this.scriptType == ScriptType.batch)) { | ||
msbuildArguments = (("\"%DEPLOYMENT_SOURCE%\\" + fixPathSeperatorToWindows(__this.solutionPath)) + "\" /verbosity:m /nologo %SCM_BUILD_ARGS%"); } | ||
msbuildArguments = (("\"%DEPLOYMENT_SOURCE%\\" + fixPathSeparatorToWindows(__this.solutionPath)) + "\" /verbosity:m /nologo %SCM_BUILD_ARGS%"); } | ||
else { | ||
msbuildArguments = (("\"$DEPLOYMENT_SOURCE\\" + fixPathSeperatorToWindows(__this.solutionPath)) + "\" /verbosity:m /nologo $env:SCM_BUILD_ARGS"); } ; | ||
msbuildArguments = (("\"$DEPLOYMENT_SOURCE\\" + fixPathSeparatorToWindows(__this.solutionPath)) + "\" /verbosity:m /nologo $env:SCM_BUILD_ARGS"); } ; | ||
@@ -445,7 +406,7 @@ | ||
ScriptGenerator.prototype.generateBasicDeploymentScript = function ScriptGenerator_prototype_generateBasicDeploymentScript__13(templateFileName, _) { var lowerCaseScriptType, fixedSitePath, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateBasicDeploymentScript__13", line: 434 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateBasicDeploymentScript__13, 1, __frame, function __$ScriptGenerator_prototype_generateBasicDeploymentScript__13() { | ||
ScriptGenerator.prototype.generateBasicDeploymentScript = function ScriptGenerator_prototype_generateBasicDeploymentScript__12(templateFileName, _) { var lowerCaseScriptType, fixedSitePath, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateBasicDeploymentScript__12", line: 395 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateBasicDeploymentScript__12, 1, __frame, function __$ScriptGenerator_prototype_generateBasicDeploymentScript__12() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
lowerCaseScriptType = __this.scriptType.toLowerCase(); | ||
fixedSitePath = ((__this.scriptType === ScriptType.batch) ? fixPathSeperatorToWindows(__this.sitePath) : fixPathSeperatorToUnix(__this.sitePath)); | ||
fixedSitePath = ((__this.scriptType === ScriptType.batch) ? fixPathSeparatorToWindows(__this.sitePath) : fixPathSeparatorToUnix(__this.sitePath)); | ||
@@ -460,6 +421,21 @@ | ||
ScriptGenerator.prototype.generateDotNetDeploymentScript = function ScriptGenerator_prototype_generateDotNetDeploymentScript__14(templateFileName, options, _) { var lowerCaseScriptType, solutionDir, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetDeploymentScript__14", line: 448 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetDeploymentScript__14, 2, __frame, function __$ScriptGenerator_prototype_generateDotNetDeploymentScript__14() { | ||
ScriptGenerator.prototype.generateFunctionAppScript = function ScriptGenerator_prototype_generateFunctionAppScript__13(templateFileName, options, _) { var lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateFunctionAppScript__13", line: 409 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateFunctionAppScript__13, 2, __frame, function __$ScriptGenerator_prototype_generateFunctionAppScript__13() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
lowerCaseScriptType = __this.scriptType.toLowerCase(); | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{SitePath}/g, options.sitePath).replace(/{SolutionPath}/g, options.solutionPath).replace(/{ProjectPath}/g, options.projectPath); | ||
return __this.writeDeploymentFiles(templateContent, __cb(_, __frame, 12, 2, _, true)); });}; | ||
ScriptGenerator.prototype.generateDotNetDeploymentScript = function ScriptGenerator_prototype_generateDotNetDeploymentScript__14(templateFileName, options, _) { var lowerCaseScriptType, solutionDir, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateDotNetDeploymentScript__14", line: 424 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateDotNetDeploymentScript__14, 2, __frame, function __$ScriptGenerator_prototype_generateDotNetDeploymentScript__14() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
lowerCaseScriptType = __this.scriptType.toLowerCase(); | ||
@@ -476,3 +452,3 @@ solutionDir = (__this.solutionPath ? path.dirname(__this.solutionPath) : ""); | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),(("deploy." + lowerCaseScriptType) + ".aspnet.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{MSBuildArguments}/g, (options.msbuildArguments || "")).replace(/{MSBuildArgumentsForInPlace}/g, (options.msbuildArgumentsForInPlace || "")).replace(/{SolutionPath}/g, (__this.solutionPath || "")).replace(/{SolutionDir}/g, solutionDir).replace(/{SitePath}/g, fixPathSeperatorToWindows(__this.sitePath)); | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),(("deploy." + lowerCaseScriptType) + ".aspnet.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{MSBuildArguments}/g, (options.msbuildArguments || "")).replace(/{MSBuildArgumentsForInPlace}/g, (options.msbuildArgumentsForInPlace || "")).replace(/{SolutionPath}/g, (__this.solutionPath || "")).replace(/{SolutionDir}/g, solutionDir).replace(/{SitePath}/g, fixPathSeparatorToWindows(__this.sitePath)); | ||
@@ -482,13 +458,16 @@ return __this.writeDeploymentFiles(templateContent, __cb(_, __frame, 17, 2, _, true)); });}; | ||
ScriptGenerator.prototype.generateAspNetCoreScript = function ScriptGenerator_prototype_generateAspNetCoreScript__15(templateFileName, options, _) { var fixedAspNetCoreProject, fixedRestore, fixedSolutionPath, lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreScript__15", line: 468 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreScript__15, 2, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreScript__15() { | ||
ScriptGenerator.prototype.generateAspNetCoreScript = function ScriptGenerator_prototype_generateAspNetCoreScript__15(templateFileName, options, _) { var prop, lowerCaseScriptType, templateContent, __this = this; var __frame = { name: "ScriptGenerator_prototype_generateAspNetCoreScript__15", line: 444 }; return __func(_, this, arguments, ScriptGenerator_prototype_generateAspNetCoreScript__15, 2, __frame, function __$ScriptGenerator_prototype_generateAspNetCoreScript__15() { | ||
argNotNull(templateFileName, "templateFileName"); | ||
fixedAspNetCoreProject = ((__this.scriptType === ScriptType.batch) ? fixPathSeperatorToWindows(options.aspNetCoreProject) : fixPathSeperatorToUnix(options.aspNetCoreProject)); | ||
fixedRestore = ((__this.scriptType === ScriptType.batch) ? fixPathSeperatorToWindows(options.restore) : fixPathSeperatorToUnix(options.restore)); | ||
fixedSolutionPath = ((__this.scriptType === ScriptType.batch) ? fixPathSeperatorToWindows(options.solutionPath) : fixPathSeperatorToUnix(options.solutionPath)); | ||
if ((__this.scriptType === ScriptType.batch)) { | ||
for (prop in options) { | ||
options[prop] = fixPathSeparatorToWindows(options[prop]); }; } | ||
lowerCaseScriptType = __this.scriptType.toLowerCase(); | ||
else { | ||
for (prop in options) { | ||
options[prop] = fixPathSeparatorToUnix(options[prop]); }; } ; | ||
lowerCaseScriptType = __this.scriptType.toLowerCase(); | ||
@@ -500,5 +479,5 @@ | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),(("deploy." + lowerCaseScriptType) + ".aspnet.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{PROJECT}/g, fixedAspNetCoreProject).replace(/{SolutionPath}/g, fixedSolutionPath).replace(/{MSBuildArguments}/g, options.msbuildArguments).replace(/{Restore}/g, fixedRestore).replace(/{DotNetPublishArguments}/g, options.dotnetpublishArguments); | ||
templateContent = getTemplatesContent([(("deploy." + lowerCaseScriptType) + ".prefix.template"),(("deploy." + lowerCaseScriptType) + ".aspnet.template"),((("deploy." + lowerCaseScriptType) + ".") + templateFileName),(("deploy." + lowerCaseScriptType) + ".postfix.template"),]).replace(/{DotnetpublishArguments}/g, options.DotnetpublishArguments).replace(/{RestoreArguments}/g, options.RestoreArguments); | ||
return __this.writeDeploymentFiles(templateContent, __cb(_, __frame, 19, 2, _, true)); });}; | ||
return __this.writeDeploymentFiles(templateContent, __cb(_, __frame, 22, 2, _, true)); });}; | ||
@@ -518,7 +497,7 @@ | ||
function fixPathSeperatorToWindows(pathStr) { | ||
function fixPathSeparatorToWindows(pathStr) { | ||
return (pathStr ? pathStr.replace(/\//g, "\\") : pathStr);}; | ||
function fixPathSeperatorToUnix(pathStr) { | ||
function fixPathSeparatorToUnix(pathStr) { | ||
return (pathStr ? pathStr.replace(/\\/g, "/") : pathStr);}; | ||
@@ -535,3 +514,3 @@ | ||
ScriptGenerator.prototype.writeDeploymentFiles = function ScriptGenerator_prototype_writeDeploymentFiles__16(templateContent, _) { var deployScriptFileName, deploymentCommand, deployScriptPath, deploymentFilePath, __this = this; var __frame = { name: "ScriptGenerator_prototype_writeDeploymentFiles__16", line: 518 }; return __func(_, this, arguments, ScriptGenerator_prototype_writeDeploymentFiles__16, 1, __frame, function __$ScriptGenerator_prototype_writeDeploymentFiles__16() { | ||
ScriptGenerator.prototype.writeDeploymentFiles = function ScriptGenerator_prototype_writeDeploymentFiles__16(templateContent, _) { var deployScriptFileName, deploymentCommand, deployScriptPath, deploymentFilePath, __this = this; var __frame = { name: "ScriptGenerator_prototype_writeDeploymentFiles__16", line: 497 }; return __func(_, this, arguments, ScriptGenerator_prototype_writeDeploymentFiles__16, 1, __frame, function __$ScriptGenerator_prototype_writeDeploymentFiles__16() { | ||
argNotNull(templateContent, "templateContent"); | ||
@@ -577,3 +556,3 @@ | ||
function writeContentToFile(path, content, _) { var __frame = { name: "writeContentToFile", line: 559 }; return __func(_, this, arguments, writeContentToFile, 2, __frame, function __$writeContentToFile() { return (function __$writeContentToFile(__then) { | ||
function writeContentToFile(path, content, _) { var __frame = { name: "writeContentToFile", line: 538 }; return __func(_, this, arguments, writeContentToFile, 2, __frame, function __$writeContentToFile() { return (function __$writeContentToFile(__then) { | ||
@@ -580,0 +559,0 @@ if (fs.existsSync(path)) { |
{ | ||
"name": "kuduscript", | ||
"author": "Outercurve Foundation", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Tool for generating deployment scripts for Azure Websites", | ||
@@ -6,0 +6,0 @@ "tags": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86132
40
641