forked from projectkudu/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add template for msbuild functionApp
- Loading branch information
1 parent
5ab5fbc
commit fb9a9a6
Showing
12 changed files
with
153 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Kudu.Contracts.Settings; | ||
|
||
namespace Kudu.Core.Deployment.Generator | ||
{ | ||
class FunctionBasicBuilder : BaseBasicBuilder | ||
{ | ||
public FunctionBasicBuilder(IEnvironment environment, IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string repositoryPath, string projectPath) | ||
: base(environment, settings, propertyProvider, repositoryPath, projectPath, "--functionApp") | ||
{ | ||
} | ||
|
||
public override string ProjectType | ||
{ | ||
get | ||
{ | ||
return "BASIC FUNCTIONAPP"; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Kudu.Contracts.Settings; | ||
|
||
namespace Kudu.Core.Deployment.Generator | ||
{ | ||
class FunctionMsbuildBuilder : MicrosoftSiteBuilder | ||
{ | ||
public FunctionMsbuildBuilder(IEnvironment environment, IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string sourcePath, string projectFilePath, string solutionPath) | ||
: base(environment, settings, propertyProvider, sourcePath, projectFilePath, solutionPath, "--functionApp") | ||
{ | ||
} | ||
|
||
public override string ProjectType | ||
{ | ||
get | ||
{ | ||
return "MSBUILD FUNCTIONAPP"; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using Kudu.Contracts.Settings; | ||
using System; | ||
using System.Text; | ||
|
||
namespace Kudu.Core.Deployment.Generator | ||
{ | ||
|
||
public abstract class MicrosoftSiteBuilder : GeneratorSiteBuilder | ||
{ | ||
protected string SolutionPath { get; private set; } | ||
|
||
protected string CommandArgument { get; private set; } | ||
|
||
protected string ProjectFilePath { get; private set; } | ||
|
||
|
||
protected MicrosoftSiteBuilder(IEnvironment environment, IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string sourcePath, string projectFilePath, string solutionPath, string commandArgument) | ||
: base(environment, settings, propertyProvider, sourcePath) | ||
{ | ||
ProjectFilePath = CleanPath(projectFilePath); | ||
SolutionPath = CleanPath(solutionPath); | ||
CommandArgument = commandArgument; | ||
} | ||
|
||
protected override string ScriptGeneratorCommandArguments | ||
{ | ||
get | ||
{ | ||
var commandArguments = new StringBuilder(); | ||
commandArguments.AppendFormat("{0} \"{1}\"", CommandArgument, ProjectFilePath); | ||
|
||
if (!String.IsNullOrEmpty(SolutionPath)) | ||
{ | ||
commandArguments.AppendFormat(" --solutionFile \"{0}\"", SolutionPath); | ||
} | ||
else | ||
{ | ||
commandArguments.AppendFormat(" --no-solution"); | ||
} | ||
|
||
return commandArguments.ToString(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...eployment/Generator/FunctionAppEnabler.cs → ....Core/Infrastructure/FunctionAppHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
namespace Kudu.Core.Deployment.Generator | ||
namespace Kudu.Core.Infrastructure | ||
{ | ||
public static class FunctionAppEnabler | ||
internal static class FunctionAppHelper | ||
{ | ||
|
||
public static bool LooksLikeFunctionApp() | ||
{ | ||
return !string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable(Constants.FunctionRunTimeVersion)); | ||
} | ||
|
||
} | ||
} |
Oops, something went wrong.