Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit f85e7e8

Browse files
committed
Move versioning stuff to Build target, rather than Configure
Since Build assumes Restore has already been done, this also simplifies the targets
1 parent b87997a commit f85e7e8

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

build.proj

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<CommonBuildProperties>WarningLevel=0;NoWarn=1591;Out=$(Out);Configuration=$(Configuration);RunCodeAnalysis=$(RunCodeAnalysis);PackageOutputPath=$(Out)</CommonBuildProperties>
2121
<DefaultImportance Condition=" '$(DefaultImportance)' == '' ">high</DefaultImportance>
2222
<PS>%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PS>
23+
<GitInfoReportImportance>high</GitInfoReportImportance>
2324
</PropertyGroup>
2425

2526
<ItemGroup>
@@ -48,7 +49,15 @@
4849

4950
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
5051

51-
<Target Name="Build">
52+
<Target Name="Build" DependsOnTargets="GitInfoReport;GetPackageVersion">
53+
<!-- For now this is an informative version #, used to update CI -->
54+
<Message Text="Building version $(PackageVersion)" Importance="high" />
55+
<!-- Update AppVeyor build # to match the actual one being used -->
56+
<Exec Command="appveyor UpdateBuild -Version $(PackageVersion)"
57+
Condition=" '$(APPVEYOR)' == 'true' "
58+
ConsoleToMSBuild="true"
59+
ContinueOnError="WarnAndContinue" />
60+
5261
<Exec Command="rmdir $(Out) /S /Q" Condition=" Exists('$(Out)') " ContinueOnError="true" StandardOutputImportance="low" />
5362
<MakeDir Directories="$(Out)" Condition="!Exists('$(Out)')" />
5463
<Message Text="Build properties: $(CommonBuildProperties)." Importance="high" />
@@ -140,25 +149,10 @@
140149
</Target>
141150
<Import Project="src\PackageVersion.targets" />
142151

143-
<Target Name="Configure" DependsOnTargets="GetPackageVersion">
152+
<Target Name="Configure">
144153
<Message Importance="high" Text="*********************************************************************************************************************" />
145154
<Message Importance="high" Text="$([System.Environment]::CommandLine)" />
146155
<Message Importance="high" Text="*********************************************************************************************************************" />
147-
148-
<!-- Invoke GitVersion just like the project-level targets do -->
149-
<CallTarget Targets="GitInfoReport" Condition="'$(target)' != 'Restore'" />
150-
<!-- For now this is an informative version #, used to update CI -->
151-
<Message Text="Building version $(PackageVersion)" Importance="high" Condition="'$(target)' != 'Restore'" />
152-
153-
<PropertyGroup>
154-
<GitInfoReportImportance>high</GitInfoReportImportance>
155-
</PropertyGroup>
156-
157-
<!-- Update AppVeyor build # to match the actual one being used -->
158-
<Exec Command="appveyor UpdateBuild -Version $(PackageVersion)"
159-
Condition=" '$(APPVEYOR)' == 'true' and '$(target)' != 'Restore'"
160-
ConsoleToMSBuild="true"
161-
ContinueOnError="WarnAndContinue" />
162156
</Target>
163157

164158
<Import Project="corebuild\corebuild.targets" />

0 commit comments

Comments
 (0)