forked from pact-foundation/pact-net
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First cut at adding multi platform support
- Loading branch information
1 parent
08638b5
commit fc4a4a3
Showing
22 changed files
with
283 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,5 @@ Build/PactNet*.nupkg | |
*.DotSettings | ||
PactNet/Files/pact/ | ||
.vs/ | ||
tools/ | ||
tools/ | ||
build/tools/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="7Zip4Powershell" version="1.8.0" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<metadata> | ||
<id>PactNet-Linux-x64</id> | ||
<version>$version$</version> | ||
<authors>seek.com.au</authors> | ||
<owners>seek.com.au</owners> | ||
<licenseUrl>https://github.com/SEEK-Jobs/pact-net/blob/master/LICENSE.txt</licenseUrl> | ||
<projectUrl>https://github.com/SEEK-Jobs/pact-net</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A .NET version of Pact, which enables consumer driven contract testing.</description> | ||
<dependencies> | ||
<dependency id="PactNet" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\pact-linux-x86_64\**" target="tools\pact-linux-x86_64\" /> | ||
<file src="PactNet.targets" target="build" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<metadata> | ||
<id>PactNet-Linux-x86</id> | ||
<version>$version$</version> | ||
<authors>seek.com.au</authors> | ||
<owners>seek.com.au</owners> | ||
<licenseUrl>https://github.com/SEEK-Jobs/pact-net/blob/master/LICENSE.txt</licenseUrl> | ||
<projectUrl>https://github.com/SEEK-Jobs/pact-net</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A .NET version of Pact, which enables consumer driven contract testing.</description> | ||
<dependencies> | ||
<dependency id="PactNet" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\pact-linux-x86\**" target="tools\pact-linux-x86\" /> | ||
<file src="PactNet.targets" target="build" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<metadata> | ||
<id>PactNet-OSX</id> | ||
<version>$version$</version> | ||
<authors>seek.com.au</authors> | ||
<owners>seek.com.au</owners> | ||
<licenseUrl>https://github.com/SEEK-Jobs/pact-net/blob/master/LICENSE.txt</licenseUrl> | ||
<projectUrl>https://github.com/SEEK-Jobs/pact-net</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A .NET version of Pact, which enables consumer driven contract testing.</description> | ||
<dependencies> | ||
<dependency id="PactNet" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\pact-osx\**" target="tools\pact-osx\" /> | ||
<file src="PactNet.targets" target="build" /> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0"?> | ||
<package> | ||
<metadata> | ||
<id>PactNet-Windows</id> | ||
<version>$version$</version> | ||
<authors>seek.com.au</authors> | ||
<owners>seek.com.au</owners> | ||
<licenseUrl>https://github.com/SEEK-Jobs/pact-net/blob/master/LICENSE.txt</licenseUrl> | ||
<projectUrl>https://github.com/SEEK-Jobs/pact-net</projectUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>A .NET version of Pact, which enables consumer driven contract testing.</description> | ||
<dependencies> | ||
<dependency id="PactNet" version="$version$" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\pact-win32\**" target="tools\pact-win32\" /> | ||
<file src="PactNet.targets" target="build\PactNet-Windows.targets" /> | ||
</files> | ||
</package> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[ValidatePattern('\d\.\d\.*')] | ||
[string] | ||
$ReleaseVersionNumber, | ||
|
||
[switch]$Push, | ||
|
||
[string]$ApiKey | ||
) | ||
|
||
$PSScriptFilePath = (Get-Item $MyInvocation.MyCommand.Path).FullName | ||
|
||
$BuildRoot = Split-Path -Path $PSScriptFilePath -Parent | ||
$SolutionRoot = Split-Path -Path $BuildRoot -Parent | ||
$NuGetExe = Join-Path $BuildRoot -ChildPath '..\.nuget\nuget.exe' | ||
|
||
$StandaloneCoreReleases = @('PactNet-Windows','PactNet-OSX','PactNet-Linux-x64','PactNet-Linux-x86') | ||
|
||
foreach ($StandaloneCoreRelease in $StandaloneCoreReleases) | ||
{ | ||
# Build the NuGet package | ||
$ProjectPath = Join-Path -Path $SolutionRoot -ChildPath "Build\$StandaloneCoreRelease.nuspec" | ||
& $NuGetExe pack $ProjectPath -Properties Configuration=Release -OutputDirectory $BuildRoot -Version $ReleaseVersionNumber -NoPackageAnalysis -NoDefaultExcludes | ||
if (-not $?) | ||
{ | ||
throw 'The NuGet process returned an error code.' | ||
} | ||
|
||
# Upload the NuGet package | ||
if ($Push) | ||
{ | ||
if($ApiKey) | ||
{ | ||
& $NuGetExe setApiKey $ApiKey | ||
} | ||
|
||
$NuPkgPath = Join-Path -Path $BuildRoot -ChildPath "$StandaloneCoreRelease.$ReleaseVersionNumber.nupkg" | ||
& $NuGetExe push $NuPkgPath | ||
if (-not $?) | ||
{ | ||
throw 'The NuGet process returned an error code.' | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace PactNet.Models | ||
{ | ||
internal enum Platform | ||
{ | ||
Windows, | ||
Osx, | ||
LinuxX86, | ||
LinuxX64 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.