Math.NET Numerics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

83 lines
4.8 KiB

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="BuildPackages" ToolsVersion="4.0">
<UsingTask AssemblyFile="$(MSBuildProjectDirectory)/../MSBuild.Community.Tasks.v1.2.0.306/MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.XmlUpdate" />
<UsingTask AssemblyFile="$(MSBuildProjectDirectory)/../MSBuild.Community.Tasks.v1.2.0.306/MSBuild.Community.Tasks.dll" TaskName="MSBuild.Community.Tasks.FileUpdate" />
<PropertyGroup>
<NuGetExe>$(MSBuildProjectDirectory)/../../tools/NuGet/nuget.exe</NuGetExe>
<Root>$(MSBuildProjectDirectory)/../..</Root>
<OutLib>$(MSBuildProjectDirectory)/../../out/lib-signed</OutLib>
<OutNuGetPackages>$(MSBuildProjectDirectory)/../../out/packages/NuGet</OutNuGetPackages>
<NumericsPack>$(MSBuildProjectDirectory)/Numerics.Signed</NumericsPack>
<FSharpPack>$(MSBuildProjectDirectory)/FSharp.Signed</FSharpPack>
</PropertyGroup>
<ItemGroup>
<NumericsNet40 Include="$(OutLib)/Net40/MathNet.Numerics.dll;$(OutLib)/Net40/MathNet.Numerics.pdb;$(OutLib)/Net40/MathNet.Numerics.xml" />
<FSharpNet40 Include="$(OutLib)/Net40/MathNet.Numerics.FSharp.dll;$(OutLib)/Net40/MathNet.Numerics.FSharp.pdb;$(OutLib)/Net40/MathNet.Numerics.FSharp.xml" />
</ItemGroup>
<Target Name="CopyContentFiles">
<RemoveDir Directories="$(NumericsPack)/content" />
<Copy SourceFiles="$(Root)/RELEASENOTES.md" DestinationFiles="$(NumericsPack)/readme.txt" />
<Copy SourceFiles="$(Root)/RELEASENOTES.md" DestinationFiles="$(FSharpPack)/readme.txt" />
<Copy SourceFiles="$(Root)/LICENSE.md" DestinationFiles="$(NumericsPack)/license.txt" />
<Copy SourceFiles="$(Root)/LICENSE.md" DestinationFiles="$(FSharpPack)/license.txt" />
<RemoveDir Directories="$(NumericsPack)/lib" />
<Copy SourceFiles="@(NumericsNet40)" DestinationFolder="$(NumericsPack)/lib/net40" />
<RemoveDir Directories="$(FSharpPack)/lib" />
<Copy SourceFiles="@(FSharpNet40)" DestinationFolder="$(FSharpPack)/lib/net40" />
</Target>
<Target Name="UpdateNuspec" DependsOnTargets="CopyContentFiles">
<!-- Evaluate Assembly Identity -->
<GetAssemblyIdentity AssemblyFiles="$(NumericsPack)/lib/Net40/MathNet.Numerics.dll">
<Output TaskParameter="Assemblies" ItemName="NumericsAssemblyInfo"/>
</GetAssemblyIdentity>
<GetAssemblyIdentity AssemblyFiles="$(FSharpPack)/lib/Net40/MathNet.Numerics.FSharp.dll">
<Output TaskParameter="Assemblies" ItemName="FSharpAssemblyInfo"/>
</GetAssemblyIdentity>
<!-- Extract Assembly Versions -->
<PropertyGroup>
<NumericsAssemblyVersion>%(NumericsAssemblyInfo.Version)</NumericsAssemblyVersion>
<FSharpAssemblyVersion>%(FSharpAssemblyInfo.Version)</FSharpAssemblyVersion>
</PropertyGroup>
<!-- Package Versions (skip 4th part/build number, for semvar compliance) -->
<PropertyGroup Condition="'$(semverPackage)' == ''">
<NumericsPackVersion>$(NumericsAssemblyVersion.Substring(0, $(NumericsAssemblyVersion.LastIndexOf('.'))))</NumericsPackVersion>
<FSharpPackVersion>$(FSharpAssemblyVersion.Substring(0, $(FSharpAssemblyVersion.LastIndexOf('.'))))</FSharpPackVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(semverPackage)' != ''">
<NumericsPackVersion>$(semverPackage)</NumericsPackVersion>
<FSharpPackVersion>$(semverPackage)</FSharpPackVersion>
</PropertyGroup>
<XmlUpdate
Prefix="n" Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
XmlFileName="$(NumericsPack)/MathNet.Numerics.Signed.nuspec"
XPath="//package/n:metadata/n:version"
Value="$(NumericsPackVersion)"/>
<XmlUpdate
Prefix="n" Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
XmlFileName="$(FSharpPack)/MathNet.Numerics.FSharp.Signed.nuspec"
XPath="//package/n:metadata/n:version"
Value="$(FSharpPackVersion)"/>
<XmlUpdate
Prefix="n" Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
XmlFileName="$(FSharpPack)/MathNet.Numerics.FSharp.Signed.nuspec"
XPath="//package/n:metadata/n:dependencies/n:dependency[@id='MathNet.Numerics.Signed']/@version"
Value="$(NumericsPackVersion)"/>
</Target>
<Target Name="BuildPackages" DependsOnTargets="UpdateNuspec">
<MakeDir Directories="$(OutNuGetPackages)" />
<Exec Command="$(NuGetExe) pack $(NumericsPack)/MathNet.Numerics.Signed.nuspec -Verbosity detailed -OutputDirectory $(OutNuGetPackages)" />
<Exec Command="$(NuGetExe) pack $(FSharpPack)/MathNet.Numerics.FSharp.Signed.nuspec -Verbosity detailed -OutputDirectory $(OutNuGetPackages)" />
</Target>
</Project>