mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Merge pull request #1026 from PowerShell/vors/nuget
Adding Nuget artifacts to AppVeyor project nuget feed
This commit is contained in:
commit
7033dc31f1
3 files changed
+43
-7
No files matched your search
@@ -18,3 +18,6 @@ dotnet-install.ps1
|
||||
|
||||
# ignore the version file as it is generated at build time
|
||||
powershell.version
|
||||
|
||||
# default location for produced nuget packages
|
||||
/nuget-artifacts
|
||||
+12
-7
@@ -1,6 +1,7 @@
|
||||
image: Visual Studio 2015
|
||||
version: 0.4.0.{build}
|
||||
|
||||
version: 0.2.0.{build}
|
||||
nuget:
|
||||
project_feed: true
|
||||
|
||||
environment:
|
||||
priv_key:
|
||||
@@ -23,7 +24,6 @@ install:
|
||||
build_script:
|
||||
- ps: |
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Import-Module .\build.psm1
|
||||
Start-PSBuild -Publish
|
||||
Start-PSBuild -FullCLR
|
||||
|
||||
@@ -73,12 +73,17 @@ on_finish:
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($env:CoreOutput, $zipFilePath)
|
||||
[System.IO.Compression.ZipFile]::CreateFromDirectory($env:FullOutput, $zipFileFullPath)
|
||||
|
||||
@(
|
||||
# You can add other artifacts here
|
||||
$artifacts = @(
|
||||
$zipFilePath,
|
||||
$zipFileFullPath
|
||||
) | % {
|
||||
Write-Host "Pushing package $_ as Appveyor artifact"
|
||||
)
|
||||
|
||||
Publish-NuGetFeed -OutputPath .\nuget-artifacts -VersionSuffix "b$($env:APPVEYOR_BUILD_NUMBER)"
|
||||
|
||||
$artifacts += (ls .\nuget-artifacts | % {$_.FullName})
|
||||
|
||||
$artifacts | % {
|
||||
Write-Host "Pushing $_ as Appveyor artifact"
|
||||
Push-AppveyorArtifact $_
|
||||
}
|
||||
} catch {
|
||||
|
||||
+28
@@ -529,6 +529,34 @@ Built upon .NET Core, it is also a C# REPL.
|
||||
}
|
||||
}
|
||||
|
||||
function Publish-NuGetFeed
|
||||
{
|
||||
param(
|
||||
[string]$OutputPath = "$PSScriptRoot/nuget-artifacts",
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$VersionSuffix
|
||||
)
|
||||
|
||||
@(
|
||||
'Microsoft.Management.Infrastructure',
|
||||
'Microsoft.PowerShell.Commands.Management',
|
||||
'Microsoft.PowerShell.Commands.Utility',
|
||||
'Microsoft.PowerShell.ConsoleHost',
|
||||
'Microsoft.PowerShell.PSReadLine',
|
||||
'Microsoft.PowerShell.Security',
|
||||
'System.Management.Automation'
|
||||
) | % {
|
||||
if ($VersionSuffix)
|
||||
{
|
||||
dotnet pack "src/$_" --output $OutputPath --version-suffix $VersionSuffix
|
||||
}
|
||||
else
|
||||
{
|
||||
dotnet pack "src/$_" --output $OutputPath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Start-DevPSGitHub {
|
||||
param(
|
||||
|
||||
Reference in new issue
Block a user