Skip to content

Commit

Permalink
fixing packing
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed May 21, 2017
1 parent 8d3ae0f commit 7991a69
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
20 changes: 2 additions & 18 deletions Source/nuspecs/nuget.ps1
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
param([string]$configuration, [string]$solutionPath)

$nugetOutputDirectory = '../Build'
$nugetOutputDirectory = '../Build'

$releaseNotesUri = 'https://github.com/PrismLibrary/Prism/wiki/Release-Notes-'
$coreFileVersion = '1.0.0'
$nugetFileName = 'nuget.exe'


if($solutionPath -like '*PrismLibrary_XF*' -and $configuration -eq 'Release')
{
Write-Host "Packing PrismLibrary_XF"
dotnet pack $solutionPath -c $configuration --no-build
return
}

if($configuration -eq 'Test' -or $solutionPath -notlike 'PrismLibrary.sln')
{
Write-Host "Returning without packing $solutionPath"
return
}

Write-Host "Packing $solutionPath"
Write-Host "Packing $env:solution_name"

function Get-FileVersion
{
Expand Down
34 changes: 29 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ assembly_info:
environment:
matrix:
- solution_name: .\Source\PrismLibrary_Core.sln
- solution_name: .\Source\PrismLibrary_Win10.sln
- solution_name: .\Sandbox\Windows10\HelloWorld\HelloWorld.sln
- solution_name: .\Source\PrismLibrary_Win10.sln
- solution_name: .\Source\PrismLibrary_Wpf.sln
- solution_name: .\Source\PrismLibrary_XF.sln
- solution_name: .\Sandbox\Xamarin\HelloWorld\HelloWorld.sln
- solution_name: .\Source\PrismLibrary_XF.sln
- solution_name: .\Source\PrismLibrary.sln

matrix:
Expand Down Expand Up @@ -103,9 +103,32 @@ build_script:
- msbuild %solution_name% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

after_build:
#- dotnet pack %solution_name%
# -ps: Write-Host "Completed build for $env:solution_name"
- ps: .\Source\nuspecs\nuget.ps1 -configuration $env:Configuration -solutionPath $env:solution_name
- ps: >-
if($env:solution_name.EndsWith("PrismLibrary_XF.sln") -and $env:Configuration -eq 'Release')
{
Write-Host "Packing PrismLibrary_XF"
dotnet pack $env:solution_name -c $env:Configuration --no-build
}
elseif($env:Configuration -eq 'Release' -and $env:solution_name.EndsWith("PrismLibrary.sln"))
{
Write-Host "Packing $env:solution_name"
.\Source\nuspecs\nuget.ps1
}
if($env:Configuration -eq 'Release')
{
$env:SOLUTION_ARTIFACTS_DIRECTORY = (Get-Item $env:solution_name).Basename
New-Item -ItemType Directory -Force -Path $env:SOLUTION_ARTIFACTS_DIRECTORY
Copy-Item "**\bin\Release\**\Prism*dll","**\bin\Release\**\Prism*xml" -Destination ./$env:SOLUTION_ARTIFACTS_DIRECTORY/ -Recurse -Exclude "*Tool*" -Force -Confirm:$False
Get-ChildItem $env:SOLUTION_ARTIFACTS_DIRECTORY
}
test_script:
# UWP tests are not currently not supported by appveyor: https://github.com/appveyor/ci/issues/393
Expand All @@ -114,6 +137,7 @@ test_script:
artifacts:
- path: '**\Build\*.nupkg'
- path: '**\nuspecs\**\*.nupkg'
- path: '$(solution_artifacts_directory)'

deploy:
- provider: NuGet
Expand Down

0 comments on commit 7991a69

Please sign in to comment.