Fix missing version numbers in packaged files and getting IBC merge version in offici...
authorElinor Fung <47805090+elinor-fung@users.noreply.github.com>
Thu, 23 May 2019 17:51:19 +0000 (10:51 -0700)
committerGitHub <noreply@github.com>
Thu, 23 May 2019 17:51:19 +0000 (10:51 -0700)
* Fix missing version numbers in packaged files in official build
* Fix build script for getting IBC merge version

build.cmd
dir.common.props
dir.props

index 3b1ff66..b06c369 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -646,7 +646,7 @@ if %__BuildCoreLib% EQU 1 (
     if %__IbcOptimize% EQU 1 (
         echo %__MsgPrefix%Commencing IBCMerge of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%
         set IbcMergeProjectFilePath=%__ProjectDir%\src\.nuget\optdata\ibcmerge.csproj
-        for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /p:ArcadeBuild=true /nologo') do @(
+        for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /p:ArcadeBuild^=true /nologo') do @(
             set __IbcMergeVersion=%%s
         )
 
index 106331e..70382d6 100644 (file)
     <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
   </PropertyGroup>
 
-  <!-- Version numbers for native binaries
-       [ARCADE REMOVE] These properties can be removed once native binaries use Arcade versioning
-       They are included in common for packaging, which is onboarded to Arcade, but uses the version
-       numbers for native binaries for some outputs. -->
-  <PropertyGroup>
-    <NativeMajorVersion>4</NativeMajorVersion>
-    <NativeMinorVersion>6</NativeMinorVersion>
-  </PropertyGroup>
-
   <!-- Set default Configuration and Platform -->
   <PropertyGroup>
     <BuildArch>$(__BuildArch)</BuildArch>
     <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
   </PropertyGroup>
 
+  <!-- Version numbers for native binaries and build version props file
+       [ARCADE REMOVE] These properties can be removed once native binaries use Arcade versioning
+       They are included in common for packaging, which is onboarded to Arcade, but uses the version
+       numbers for native binaries for some outputs. -->
+  <PropertyGroup>
+    <NativeMajorVersion>4</NativeMajorVersion>
+    <NativeMinorVersion>6</NativeMinorVersion>
+
+    <!-- Explicitly set BuildVersionFile. This is used by BuildVersion.targets in BuildTools. -->
+    <BuildVersionFile Condition="'$(OfficialBuildId)' != ''">$(RootBinDir)obj\BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
+  </PropertyGroup>
+
   <PropertyGroup>
     <!-- Central place to set the versions of all nuget packages produced in the repo -->
     <PackageVersion Condition="'$(PackageVersion)' == ''">3.0.0</PackageVersion>
index ad0cb76..e93c9f5 100644 (file)
--- a/dir.props
+++ b/dir.props
     <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
   </PropertyGroup>
 
-  <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
-  <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
-    <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
-  </PropertyGroup>
-
   <!-- Import Build tools common props file where repo-independent properties are found -->
   <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />