Add version.txt to the coreclr transport package (#11497)
authorJose Perez Rodriguez <joperezr@microsoft.com>
Wed, 10 May 2017 20:23:28 +0000 (13:23 -0700)
committerGitHub <noreply@github.com>
Wed, 10 May 2017 20:23:28 +0000 (13:23 -0700)
* Add version.txt to the coreclr transport package

* PR Feedback

dir.props
src/.nuget/dir.targets
src/.nuget/packages.builds

index 915468c..efd5959 100644 (file)
--- a/dir.props
+++ b/dir.props
     <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
     <PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
     <PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
+    <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
 
     <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
     <RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.2-beta-24224-02/runtime.json</RuntimeIdGraphDefinitionFile>
index a488694..4cd7d02 100644 (file)
   </Target>
 
   <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)\.., dir.targets))\dir.targets" />
+  <ItemGroup>
+    <!-- Add version file to packages -->
+    <File Condition="Exists('$(SyncInfoFile)')"
+          Include="$(SyncInfoFile)">
+          <SkipPackageFileCheck>true</SkipPackageFileCheck>
+    </File>
+  </ItemGroup>
 </Project>
index f57b9a9..0c0f65d 100644 (file)
@@ -25,5 +25,9 @@
     <Project Include="Microsoft.NETCore.ILDAsm\Microsoft.NETCore.ILDAsm.builds" />
   </ItemGroup>
 
+  <Import Project="$(ToolsDir)versioning.targets" />
+  <!-- Make sure we create version.txt file since it will be packaged -->
+  <Target Name="EnsureVersionInfoFileExists" BeforeTargets="Build" DependsOnTargets="CreateVersionInfoFile" />
+
   <Import Project="$(MSBuildThisFileDirectory)..\..\dir.traversal.targets" />
 </Project>