-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerShellDeploySample.msbuild
More file actions
55 lines (48 loc) · 2.22 KB
/
Copy pathPowerShellDeploySample.msbuild
File metadata and controls
55 lines (48 loc) · 2.22 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Clean;Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputDir>$(MSBuildProjectDirectory)\output</OutputDir>
<Configuration>Release</Configuration>
<BuildProperties>VisualStudioVersion=11.0;Configuration=$(Configuration);Platform=AnyCPU</BuildProperties>
<SubscriptionName></SubscriptionName>
<CloudServiceName></CloudServiceName>
<StorageAccountName></StorageAccountName>
<BlobContainerName>deploycontainer</BlobContainerName>
<Location>East Asia</Location>
</PropertyGroup>
<ItemGroup>
<ProjectFile Include="$(MSBuildProjectDirectory)\**\*.ccproj"/>
</ItemGroup>
<Target Name="Clean">
<RemoveDir Directories="$(OutputDir)" />
<MSBuild Targets="Clean" Projects="@(ProjectFile)"
Properties="$(BuildProperties)" />
</Target>
<Target Name="Build">
<MSBuild Targets="Publish" Projects="@(ProjectFile)"
Properties="$(BuildProperties);PublishDir=$(OutputDir)\" />
</Target>
<Target Name="Deploy" >
<ItemGroup >
<CspkgFile Include="$(OutputDir)\*.cspkg"/>
<CscfgFile Include="$(OutputDir)\*.cscfg"/>
</ItemGroup>
<PropertyGroup>
<CloudServicePackage>@(CspkgFile)</CloudServicePackage>
<CloudServiceConfiguration>@(CscfgFile)</CloudServiceConfiguration>
</PropertyGroup>
<ItemGroup >
<DeployParams Include="-SubscriptionName '$(SubscriptionName)'" />
<DeployParams Include="-CloudServiceName '$(CloudServiceName)'" />
<DeployParams Include="-CloudServicePackage '$(CloudServicePackage)'" />
<DeployParams Include="-CloudServiceConfiguration '$(CloudServiceConfiguration)'" />
<DeployParams Include="-StorageAccountName '$(StorageAccountName)'" />
<DeployParams Include="-BlobContainerName '$(BlobContainerName)'" />
<DeployParams Include="-Location '$(Location)'" />
</ItemGroup>
<Copy SourceFiles="$(MSBuildProjectDirectory)\Deploy.ps1"
DestinationFolder="$(OutputDir)" />
<Exec Command="powershell -Executionpolicy RemoteSigned -Noninteractive .\Deploy.ps1 @(DeployParams, ' ')"
WorkingDirectory="$(OutputDir)" />
</Target>
</Project>