Skip to content

Commit 03a5747

Browse files
committed
Update build information fetch code
1 parent 00b2ae5 commit 03a5747

File tree

3 files changed

+83
-7
lines changed

3 files changed

+83
-7
lines changed

tools/FetchStagedBuildInfo.proj

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<Project InitialTargets="PackageRestore" DefaultTargets="Pull" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
3+
4+
<UsingTask AssemblyFile="$(AzureStorageBuildTasksPath)FireGiant.BuildTasks.AzureStorage.dll" TaskName="DownloadBlobs" />
5+
<UsingTask AssemblyFile="$(MSBuildCommunityTasksPath)MSBuild.Community.Tasks.dll" TaskName="Unzip" />
6+
7+
<PropertyGroup>
8+
<ProjectFolder>$(MSBuildThisFileDirectory)..\</ProjectFolder>
9+
<Configuration>Release</Configuration>
10+
11+
<NugetPackageFolder>$(ProjectFolder)packages\</NugetPackageFolder>
12+
13+
<BuildFolder>$(OutputFolder)</BuildFolder>
14+
<BuildFolder Condition="'$(BuildFolder)' == '' ">$(ProjectFolder)build\</BuildFolder>
15+
<BuildFolder Condition="'$(BuildFolder)' != '' and !HasTrailingSlash('$(BuildFolder)')">$(BuildFolder)\</BuildFolder>
16+
17+
<DownloadFolder>$(BuildFolder)dl\</DownloadFolder>
18+
19+
<WebRootSourceFolder>$(ProjectFolder)src\Web\Static\</WebRootSourceFolder>
20+
</PropertyGroup>
21+
22+
<!--
23+
================================================================================================
24+
Pull
25+
26+
Downloads stage content from website.
27+
================================================================================================
28+
-->
29+
<Target Name="Pull"
30+
DependsOnTargets="DownloadStagedFiles;GatherDownloadedStagedFiles;UnzipManuals;CopyReleaseMetadata" />
31+
32+
<Target Name="DownloadStagedFiles"
33+
DependsOnTargets="CheckCredentials">
34+
35+
<DownloadBlobs StorageAccount="$(StorageAccount)"
36+
StorageAuthentication="$(StorageAuthentication)"
37+
StorageEmulator="$(StorageUseEmulator)"
38+
Container="staged"
39+
Blobs="@(DownloadBlob)"
40+
Folder="$(DownloadFolder)">
41+
<Output TaskParameter="Downloaded" ItemName="DownloadedBlob" />
42+
</DownloadBlobs>
43+
</Target>
44+
45+
<Target Name="GatherDownloadedStagedFiles">
46+
<ItemGroup>
47+
<ManualZip Include="$(DownloadFolder)**\v3manual.zip">
48+
<OutputFolder>$(WebRootSourceFolder)documents\documentation\manual\v3</OutputFolder>
49+
</ManualZip>
50+
<ManualZip Include="$(DownloadFolder)**\v4manual.zip">
51+
<OutputFolder>$(WebRootSourceFolder)documents\documentation\manual\v4</OutputFolder>
52+
</ManualZip>
53+
54+
<ReleaseMetadataFile Include="$(DownloadFolder)**\*.md">
55+
<OutputFolder>$(WebRootSourceFolder)\documents\releases\</OutputFolder>
56+
</ReleaseMetadataFile>
57+
</ItemGroup>
58+
</Target>
59+
60+
<Target Name="UnzipManuals"
61+
Condition=" '@(ManualZip)'!='' ">
62+
<RemoveDir Directories="%(ManualZip.OutputFolder)" />
63+
64+
<Unzip ZipFileName="@(ManualZip)"
65+
TargetDirectory="%(OutputFolder)"
66+
Quiet="true" />
67+
</Target>
68+
69+
<Target Name="CopyReleaseMetadata">
70+
<Copy SourceFiles='@(ReleaseMetadataFile)'
71+
DestinationFiles="@(ReleaseMetadataFile->'%(OutputFolder)%(RecursiveDir)%(Filename)%(Extension)' )"
72+
SkipUnchangedFiles='true' />
73+
</Target>
74+
75+
76+
<Target Name="CheckCredentials">
77+
<Error Text="Must specify Azure storage account property on the command-line using the -p:StorageAccount= property." Condition=" '$(StorageAccount)'=='' " />
78+
<Error Text="Must specify Azure storage authentication property on the command-line using the -p:StorageAuthentication= property." Condition=" '$(StorageAuthentication)'=='' " />
79+
</Target>
80+
81+
<Import Project="PackageRestore.targets" />
82+
</Project>

tools/PackageRestore.targets

+1-7
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
Restores the required packages to build using nuget.exe.
2828
================================================================================================
2929
-->
30-
<Target Name="PackageRestore"
31-
DependsOnTargets="NugetPackageRestore;SolutionPackageRestore" />
30+
<Target Name="PackageRestore" DependsOnTargets="NugetPackageRestore" />
3231

3332
<!-- Nuget Package Restore -->
3433
<ItemGroup>
@@ -48,11 +47,6 @@
4847
WorkingDirectory="$(MSBuildThisFileDirectory)" />
4948
</Target>
5049

51-
<Target Name="SolutionPackageRestore">
52-
<Exec Command="&quot;$(NugetExe)&quot; restore "
53-
WorkingDirectory="$(ProjectFolder)api" />
54-
</Target>
55-
5650
<!-- Sentinel value that indicates Nuget.targets has been initialized. -->
5751
<PropertyGroup>
5852
<WixBuildNugetPropertiesDefined>true</WixBuildNugetPropertiesDefined>

tools/nuget/NuGet.exe

468 KB
Binary file not shown.

0 commit comments

Comments
 (0)