Skip to content

Commit

Permalink
stripe.net is now a .net core app, added nuget support for .net core …
Browse files Browse the repository at this point in the history
…and netstandard1.2, fixed all tests, big thanks to @flagbug (#686)
  • Loading branch information
jaymedavis authored Nov 29, 2016
1 parent 36dd622 commit 96cdbaf
Show file tree
Hide file tree
Showing 388 changed files with 443 additions and 1,348 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# build
[Bb]uild/
[Dd]ebug/
[Pp]ackages/
[Rr]elease/
Expand Down
24 changes: 17 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
version: 6.11.1.{build}
image: Visual Studio 2015

environment:
stripe_test_secret_key:
secure: +p/EWA8+0B64k7a88nb6ZiSTcv6TIukyhQQU2Ljf7jNVtwVZXhJtNf5LdemV7EuY

install:
- ps: Import-Module .\build\build.psm1

before_build:
- nuget restore src\Stripe.sln
- ps: Invoke-Restore

build_script:
- ps: Invoke-Build

test_script:
- ps: Invoke-Test

build:
verbosity: minimal
after_build:
- ps: Invoke-Pack

assembly_info:
patch: true
file: src\SharedAssemblyInfo.cs
assembly_version: '6.11.1'
artifacts:
- path: src
name: src-folder
type: zip
10 changes: 0 additions & 10 deletions build.cmd

This file was deleted.

32 changes: 0 additions & 32 deletions build/Stripe.net.nuspec

This file was deleted.

89 changes: 89 additions & 0 deletions build/build.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
function Invoke-Restore()
{
dotnet restore
}

function Invoke-Build
{
dotnet build -c Debug src\Stripe.net
dotnet build -c Release src\Stripe.net

# this definitely needs to be wrapped up from below code
dotnet build src\Stripe.Tests

#$missing_comments = 0
#$missing_comments_portable = 0
#$deprecated_types = 0
#$deprecated_types_portable = 0
#$tests_deprecated_types = 0

#foreach($line in $build) {
# if (${line} -Match "warning CS1591" -and ${line} -Match "Stripe.csproj") { $missing_comments++ }
# elseif (${line} -Match "warning CS0618" -and ${line} -Match "Stripe.csproj") { $deprecated_types++ }
# elseif (${line} -Match "warning CS1591" -and ${line} -Match "Stripe.Portable.csproj") { $missing_comments_portable++ }
# elseif (${line} -Match "warning CS0618" -and ${line} -Match "Stripe.Portable.csproj") { $deprecated_types_portable++ }
# elseif (${line} -Match "warning CS0618" -and ${line} -Match "Stripe.Tests.csproj") { $tests_deprecated_types++ }
# elseif (${line} -Match "warning CS0169" -and ${line} -Match "Stripe.Tests.csproj" -and ${line} -Match ".behaviors" ) { } # do nothing - this is just behaviors
# elseif (${line}) { write-host ${line} }
#}

#Write-Host " "
#Write-Host $("NET45: $missing_comments publicly visible items are missing XML comments") -ForegroundColor Cyan
#Write-Host $("PORTABLE: $missing_comments_portable publicly visible items are missing XML comments") -ForegroundColor DarkCyan
#Write-Host $("NET45: $deprecated_types items are deprecated") -ForegroundColor Cyan
#Write-Host $("PORTABLE: $deprecated_types_portable items are deprecated") -ForegroundColor DarkCyan
#Write-Host $("TESTS: $tests_deprecated_types tests are targetting deprecated types") -ForegroundColor Yellow

Write-Host " "
}

function Invoke-Test
{
dotnet test src\Stripe.net.Tests
}

function Invoke-Pack
{
dotnet pack -c Release src\Stripe.net
}

#function Invoke-NuGetCheck
#{
# Write-Host " "
# Write-Host "Starting NuGet check..."

# $headers = @{
# "Authorization" = "Bearer $env:token"
# "Content-type" = "application/json"
# }

# $url = "https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=2"

# $history = Invoke-RestMethod -Uri $url -Headers $headers -Method Get

# if ($history.builds.Length -lt 2) {throw "history is not long enough"}

# write-host "previous version:"
# $history.builds[1].version
# write-host "current version:"
# $env:APPVEYOR_BUILD_VERSION

# $previousVersionSplit = $history.builds[1].version.Split(".")
# if ($previousVersionSplit.Length -lt 3) {throw "previous build version has no enough parts"}

# $currentVersionSplit = $env:APPVEYOR_BUILD_VERSION.Split(".")
# if ($currentVersionSplit.Length -lt 3) {throw "current build version has no enough parts"}

# $pushNuget = $false
# for ($i = 0; $i -lt 3; $i++) {if ($previousVersionSplit[$i] -ne $currentVersionSplit[$i]) {write-host "at least one part changed, will push nuget"; $pushNuget = $true; break}}

# nuget pack $env:APPVEYOR_BUILD_FOLDER\build\Stripe.net.nuspec

# if(!$pushNuget) {
# write-host "all parts are the same, will not push Nuget"
# # do "nuget pack" here
# # do "appveyor PushArtifact <your-nugetpackage.nupkg>" accordig to https://www.appveyor.com/docs/nuget/
# }

# Write-Host " "
#}
Empty file removed build/net45/.gitkeep
Empty file.
34 changes: 0 additions & 34 deletions build/net45/Stripe.net.xml

This file was deleted.

Binary file removed build/nuget.exe
Binary file not shown.
Empty file removed build/portable/.gitkeep
Empty file.
34 changes: 0 additions & 34 deletions build/portable/Stripe.net.xml

This file was deleted.

Loading

0 comments on commit 96cdbaf

Please sign in to comment.