-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform-api-net.proj
98 lines (90 loc) · 5.96 KB
/
platform-api-net.proj
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<Project DefaultTargets="Build;Deploy;Publish" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild_Zip_Utils.targets" />
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<ProductName>platform-api-net</ProductName>
<OutputDirectory>artifact</OutputDirectory>
</PropertyGroup>
<Target Name="Build" Outputs="@(BuildOutput)">
<Message Text="Building..." />
<MSBuild Targets="Build"
Projects="Granicus.MediaManager.UserSDK.sln"
Properties="Configuration=$(Configuration); Platform=$(Platform); BuildingSolutionFile=true;"
BuildInParallel="true">
<Output TaskParameter="TargetOutputs" ItemName="BuildOutput" />
</MSBuild>
<Message Text="Done building" />
</Target>
<Target Name="Clean">
<Message Text="Cleaning..." />
<MSBuild Targets="Clean"
Projects="Granicus.MediaManager.UserSDK.sln"
Properties="Configuration=$(Configuration); Platform=$(Platform); BuildingSolutionFile=true;"
BuildInParallel="true">
<Output TaskParameter="TargetOutputs" ItemName="BuildOutput" />
</MSBuild>
<RemoveDir Directories="$(OutputDirectory)" Condition="Exists('$(OutputDirectory)')" />
<Message Text="Done cleaning" />
</Target>
<Target Name="Deploy">
<Message Text="Deploying..." />
<PropertyGroup>
<OutputProductDirectory>$(OutputDirectory)\$(ProductName)</OutputProductDirectory>
<BinPlatformConfiguration>bin\$(Platform)\$(Configuration)</BinPlatformConfiguration>
<OutputProductZip>$(OutputDirectory)\$(ProductName).zip</OutputProductZip>
<ProjectToolsVersion>12.0</ProjectToolsVersion>
<Branch>unknown</Branch>
<Version>0.0.0.00000</Version>
<SourcePath>$(MSBuildProjectDirectory)</SourcePath>
<ChangeSet>0000000000000000000000000000000000000000</ChangeSet>
<PublishDate>$([System.DateTime]::Now.ToString("G"))</PublishDate>
<Publisher>$(USERNAME) - $(USERNAME)@$(computername)</Publisher>
<Comment>Initiated locally</Comment>
<BuildNumber>0</BuildNumber>
</PropertyGroup>
<PropertyGroup Condition="'$(APPVEYOR_BUILD_FOLDER)' != ''">
<Branch>$(APPVEYOR_REPO_BRANCH)</Branch>
<Version>$(APPVEYOR_BUILD_VERSION)</Version>
<ChangeSet>$(APPVEYOR_REPO_COMMIT)</ChangeSet>
<PublishDate>$(APPVEYOR_REPO_COMMIT_TIMESTAMP)</PublishDate>
<Publisher>$(APPVEYOR_REPO_COMMIT_AUTHOR) - $(APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL)</Publisher>
<Comment>$(APPVEYOR_REPO_COMMIT_MESSAGE)</Comment>
<BuildNumber>$(Appveyor_ProjectBuildNumber)</BuildNumber>
</PropertyGroup>
<ItemGroup>
<VersionXmlLine Include="line01"><Text><?xml version="1.0" encoding="utf-8"?></Text></VersionXmlLine>
<VersionXmlLine Include="line02"><Text><version_info></Text></VersionXmlLine>
<VersionXmlLine Include="line03"><Text><label>$(ProductName)</label></Text></VersionXmlLine>
<VersionXmlLine Include="line04"><Text><branch>$(Branch)</branch></Text></VersionXmlLine>
<VersionXmlLine Include="line05"><Text><version>$(Version)</version></Text></VersionXmlLine>
<VersionXmlLine Include="line06"><Text><sourcepath>$(SourcePath)</sourcepath></Text></VersionXmlLine>
<VersionXmlLine Include="line07"><Text><changeset>$(ChangeSet)</changeset></Text></VersionXmlLine>
<VersionXmlLine Include="line08"><Text><published>$(PublishDate)</published></Text></VersionXmlLine>
<VersionXmlLine Include="line09"><Text><publisher>$(Publisher)</publisher></Text></VersionXmlLine>
<VersionXmlLine Include="line10"><Text><comment>$(Comment)</comment></Text></VersionXmlLine>
<VersionXmlLine Include="line11"><Text></version_info></Text></VersionXmlLine>
</ItemGroup>
<RemoveDir Directories="$(OutputDirectory)" Condition="Exists('$(OutputDirectory)')" />
<MakeDir Directories="$(OutputDirectory)" />
<Message Text="Creating temporary file "$(OutputDirectory)\version.xml"." />
<WriteLinesToFile File="$(OutputDirectory)\version.xml" Lines="@(VersionXmlLine->'%(Text)')" Overwrite="true" />
<Zip ZipFile="$(OutputProductZip)"
Actions="
AddFiles: $(OutputDirectory)\version.xml;
AddFiles: Granicus.MediaManager.UserSDK\$(BinPlatformConfiguration)\Granicus.MediaManager.SDK.dll;
AddFiles: Granicus.MediaManager.UserSDK\$(BinPlatformConfiguration)\Granicus.MediaManager.SDK.xml;
AddFiles: Granicus.MediaManager.UserSDK\$(BinPlatformConfiguration)\Newtonsoft.Json.dll;
AddFiles: Granicus.MediaManager.UserSDK\$(BinPlatformConfiguration)\Newtonsoft.Json.xml;
"
/>
<Delete Files="$(OutputDirectory)\version.xml" />
<Message Text="Done deploying to: $(OutputProductZip)" />
</Target>
<Target Name="Publish">
<Message Text="Build is not on AppVeyor - skipping publish." Condition="'$(APPVEYOR_BUILD_FOLDER)' == ''" />
<Message Text="Publishing..." Condition="'$(APPVEYOR_BUILD_FOLDER)' != ''" />
<Exec Command="PowerShell.exe –NonInteractive –ExecutionPolicy Unrestricted -Command "& {Push-AppveyorArtifact .\artifact\platform-api-net.zip -FileName platform-api-net/$(APPVEYOR_BUILD_VERSION)/platform-api-net.zip}"" Condition="'$(APPVEYOR_BUILD_FOLDER)' != ''" />
<Message Text="Done publishing to: platform-api-net/$(APPVEYOR_BUILD_VERSION)/platform-api-net.zip" Condition="'$(APPVEYOR_BUILD_FOLDER)' != ''" />
</Target>
</Project>