Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Update nuget packaging for pcls
Browse files Browse the repository at this point in the history
  • Loading branch information
twsouthwick committed Aug 6, 2015
1 parent a0ceca9 commit 27184b1
Show file tree
Hide file tree
Showing 17 changed files with 233 additions and 389 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ rcf
.vs
project.lock.json
src/Microsoft.Fx.Portability.Offline/data/
/nupkg
11 changes: 11 additions & 0 deletions PortabilityTools.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SearchFxApi", "samples\Sear
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Fx.Portability.Reports.Json", "src\Microsoft.Fx.Portability.Reports.Json\Microsoft.Fx.Portability.Reports.Json.csproj", "{28D8D77D-E68D-4EBC-9150-F7C433D63BFA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{FEEF35CB-3AC4-40C5-9CB0-85E52E38D5C6}"
ProjectSection(SolutionItems) = preProject
build\build.ps1 = build\build.ps1
build\Microsoft.Fx.Portability.MetadataReader.nuspec = build\Microsoft.Fx.Portability.MetadataReader.nuspec
build\Microsoft.Fx.Portability.nuspec = build\Microsoft.Fx.Portability.nuspec
build\Microsoft.Fx.Portability.Offline.nuspec = build\Microsoft.Fx.Portability.Offline.nuspec
build\Microsoft.Fx.Portability.Reports.Html.nuspec = build\Microsoft.Fx.Portability.Reports.Html.nuspec
build\Microsoft.Fx.Portability.Reports.Json.nuspec = build\Microsoft.Fx.Portability.Reports.Json.nuspec
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -92,5 +102,6 @@ Global
{36E8F09A-D3CA-405B-B515-9206F85B432C} = {7DC7AA2C-0401-495B-B42C-32F44085EBE6}
{16815A46-F1CA-4D56-80C8-54C4DFB8C1BC} = {F8292A68-AF7C-4B26-B1B8-B232548EF118}
{28D8D77D-E68D-4EBC-9150-F7C433D63BFA} = {6234AABE-C4F3-4094-9C0D-FFD589235DBE}
{FEEF35CB-3AC4-40C5-9CB0-85E52E38D5C6} = {C991F5FC-04B5-420C-98A0-80974AA946F7}
EndGlobalSection
EndGlobal
58 changes: 58 additions & 0 deletions build/Create-Package.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[CmdletBinding()] # Needed to support -Verbose
param(
[string][ValidateSet("Release","Debug")]$flavor = "Release",
[string]$outdir = "$PSScriptRoot\..\nupkg"
)

$root = $PSScriptRoot
$src = "$root\..\src"

# Download a unique nuget
$guid = [System.Guid]::NewGuid()
$nuget = Join-Path ([System.IO.Path]::GetTempPath()) "nuget-$guid.exe"
Write-Verbose "Downloading nuget to $nuget"
Invoke-WebRequest "http://nuget.org/nuget.exe" -OutFile $nuget

Remove-Item $outdir -Recurse -Force
New-Item $outdir -ItemType Directory | Out-Null

[object[]]$nuspecs = Get-ChildItem $root -Filter *.nuspec `
| % { New-Object PSObject -Property @{"Name" = [System.IO.Path]::GetFileNameWithoutExtension($_.Name); "Path" = $_.FullName } }

$count = 0
foreach($nuspec in $nuspecs)
{
Write-Progress -Activity "Creating portability nupkgs" -Status "Packing '$($nuspec.Name)" -PercentComplete ($count / $nuspecs.Count * 100)
$bin = [System.IO.Path]::Combine($src, $nuspec.Name, "bin", $flavor)

if(!(Test-Path $bin))
{
Write-Warning "Could not find path: $($nuspec.Name)"
continue
}

Copy-Item $nuspec.Path $bin
Push-Location $bin

[string]$output = & $nuget pack

if($output -Match "Attempting to build package from '(.*)'. Successfully created package '(.*)'.")
{
$item = New-Object PSObject -Property @{"Name" = $matches[1]; "Path" = $matches[2]}

Copy-Item "$($item.Path)" $outdir -Force

$item
}
else
{
Write-Warning "There was an error packing nuget. Output was: '$output'"
}

Pop-Location
$count++
}

Write-Progress -Activity "Creating portability nupkgs" -Status "Complete" -PercentComplete 100

Remove-Item $nuget
28 changes: 28 additions & 0 deletions build/Microsoft.Fx.Portability.MetadataReader.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="3.0">
<id>Microsoft.Fx.Portability.MetadataReader</id>
<version>1.0.0-alpha</version>
<title>Microsoft.Fx.Portability.MetadataReader</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://github.com/Microsoft/dotnet-apiport/LICENSE</licenseUrl>
<projectUrl>https://github.com/Microsoft/dotnet-apiport</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The core data structures and network calls for .NET Portability Analyzer</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>.NET portability apiport</tags>
<dependencies>
<dependency id="Microsoft.Fx.Portability" version="1.0.0-alpha" />
<dependency id="System.Reflection.Metadata" version="1.1.0-alpha-00008" />
<dependency id="System.Security.Cryptography.Hashing.Algorithms" version="4.0.0-beta-23123" />
<dependency id="System.Diagnostics.FileVersionInfo" version="4.0.0-beta-23123" />
</dependencies>
</metadata>
<files>
<file src="dotnet\Microsoft.Fx.Portability.MetadataReader.dll" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.MetadataReader.pdb" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.MetadataReader.xml" target="lib\dotnet" />
</files>
</package>
25 changes: 25 additions & 0 deletions build/Microsoft.Fx.Portability.Offline.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="3.0">
<id>Microsoft.Fx.Portability.Offline</id>
<version>1.0.0-alpha</version>
<title>Microsoft.Fx.Portability.Offline</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://github.com/Microsoft/dotnet-apiport/LICENSE</licenseUrl>
<projectUrl>https://github.com/Microsoft/dotnet-apiport</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The core data structures and network calls for .NET Portability Analyzer</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>.NET portability apiport</tags>
<dependencies>
<dependency id="Microsoft.Fx.Portability" version="1.0.0-alpha" />
</dependencies>
</metadata>
<files>
<file src="dotnet\Microsoft.Fx.Portability.Offline.dll" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.Offline.pdb" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.Offline.xml" target="lib\dotnet" />
</files>
</package>
27 changes: 27 additions & 0 deletions build/Microsoft.Fx.Portability.Reports.Html.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="3.0">
<id>Microsoft.Fx.Portability.Reports.Html</id>
<version>1.0.0-alpha</version>
<title>Microsoft.Fx.Portability.Reports.Html</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://github.com/Microsoft/dotnet-apiport/LICENSE</licenseUrl>
<projectUrl>https://github.com/Microsoft/dotnet-apiport</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>An HTML formatter for ApiPort reports</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>.NET portability apiport</tags>
<dependencies>
<dependency id="Microsoft.Fx.Portability" version="1.0.0-alpha" />
<dependency id="MarkdownDeep.NET-Signed" version="1.5" />
<dependency id="RazorEngine" version="3.6.1" />
</dependencies>
</metadata>
<files>
<file src="net46\Microsoft.Fx.Portability.Reports.Html.dll" target="lib\net46" />
<file src="net46\Microsoft.Fx.Portability.Reports.Html.pdb" target="lib\net46" />
<file src="net46\Microsoft.Fx.Portability.Reports.Html.xml" target="lib\net46" />
</files>
</package>
26 changes: 26 additions & 0 deletions build/Microsoft.Fx.Portability.Reports.Json.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<package>
<metadata minClientVersion="3.0">
<id>Microsoft.Fx.Portability.Reports.Json</id>
<version>1.0.0-alpha</version>
<title>Microsoft.Fx.Portability.Reports.Json</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://github.com/Microsoft/dotnet-apiport/LICENSE</licenseUrl>
<projectUrl>https://github.com/Microsoft/dotnet-apiport</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>An HTML formatter for ApiPort reports</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>.NET portability apiport</tags>
<dependencies>
<dependency id="Microsoft.Fx.Portability" version="1.0.0-alpha" />
<dependency id="Newtonsoft.Json" version="6.0.8" />
</dependencies>
</metadata>
<files>
<file src="dotnet\Microsoft.Fx.Portability.Reports.Json.dll" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.Reports.Json.pdb" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.Reports.Json.xml" target="lib\dotnet" />
</files>
</package>
40 changes: 21 additions & 19 deletions build/Microsoft.Fx.Portability.nuspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>http://go.microsoft.com/fwlink/?LinkId=329770</licenseUrl>
<iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<copyright>Copyright © Microsoft Corporation</copyright>
<tags>Microsoft</tags>
<?xml version="1.0"?>
<package>
<metadata minClientVersion="3.0">
<id>Microsoft.Fx.Portability</id>
<version>1.0.0-alpha</version>
<title>Microsoft.Fx.Portability</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://github.com/Microsoft/dotnet-apiport/LICENSE</licenseUrl>
<projectUrl>https://github.com/Microsoft/dotnet-apiport</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>The core data structures and network calls for .NET Portability Analyzer</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2015</copyright>
<tags>.NET portability apiport</tags>
<dependencies>
<dependency id="Newtonsoft.Json" version="6.0.8" />
</dependencies>
</metadata>
<files>
<file src="net45\Microsoft.Fx.Portability.dll" target="lib\net45" />
<file src="net45\Microsoft.Fx.Portability.pdb" target="lib\net45" />
<file src="net45\Microsoft.Fx.Portability.xml" target="lib\net45" />

<file src="dnx451\Microsoft.Fx.Portability.dll" target="lib\dnx451" />
<file src="dnx451\Microsoft.Fx.Portability.pdb" target="lib\dnx451" />
<file src="dnx451\Microsoft.Fx.Portability.xml" target="lib\dnx451" />

<file src="dnxcore50\Microsoft.Fx.Portability.dll" target="lib\dnxcore50" />
<file src="dnxcore50\Microsoft.Fx.Portability.pdb" target="lib\dnxcore50" />
<file src="dnxcore50\Microsoft.Fx.Portability.xml" target="lib\dnxcore50" />
<file src="dotnet\Microsoft.Fx.Portability.dll" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.pdb" target="lib\dotnet" />
<file src="dotnet\Microsoft.Fx.Portability.xml" target="lib\dotnet" />
</files>
</package>
106 changes: 0 additions & 106 deletions build/after-build.ps1

This file was deleted.

47 changes: 0 additions & 47 deletions build/before-build.ps1

This file was deleted.

Loading

0 comments on commit 27184b1

Please sign in to comment.