-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.msbuild
33 lines (24 loc) · 1.29 KB
/
deploy.msbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Deploy" ToolsVersion="4.0">
<Import Project="$(GX_PROGRAM_DIR)\GeneXus.AzureDeploy.targets"/>
<Target Name= "ValidateDeploy">
<Error Text="Publish Settings property cannot be empty" Condition= "'$(AZURE_PUBLISH_SETTINGS)' == ''"/>
</Target>
<PropertyGroup Condition="'$(GENERATOR)' == 'C#' or '$(GENERATOR)' == '.NET Framework'">
<UploadSource>$(DEPLOY_PATH)</UploadSource>
</PropertyGroup>
<PropertyGroup Condition="'$(GENERATOR)' == '.NET Core' or '$(GENERATOR)' == '.NET'">
<UploadSource>$(DeploySource)</UploadSource>
</PropertyGroup>
<ItemGroup Condition="'$(GENERATOR)' == 'Java'">
<WarFile Include="$(DeploySource)"/>
<RootFile Include="@(WarFile -> '%(RelativeDir)ROOT.war')" />
</ItemGroup>
<PropertyGroup Condition="'$(GENERATOR)' == 'Java'">
<UploadSource>@(RootFile)</UploadSource>
</PropertyGroup>
<Target Name="Deploy" DependsOnTargets="ValidateDeploy">
<Message Text ="Deploying to Azure. This may take a while..." Importance="high" />
<Copy SourceFiles="$(DeploySource)" DestinationFiles="$(UploadSource)" Condition="'$(GENERATOR)' == 'Java'" />
<DeployAzureWebApp Source='$(UploadSource)' SettingsFile='$(AZURE_PUBLISH_SETTINGS)' Generator='$(GENERATOR)'/>
</Target>
</Project>