Publish windows daily build to MyGet (#9288)

This commit is contained in:
Aditya Patwardhan
2019-04-03 13:22:51 -07:00
committed by GitHub
parent 74b71f2f39
commit 4bd41e836c
2 changed files with 3 additions and 49 deletions
-46
View File
@@ -1745,52 +1745,6 @@ function Start-PSBootstrap {
}
}
function Publish-NuGetFeed
{
param(
[string]$OutputPath = "$PSScriptRoot/nuget-artifacts",
[ValidatePattern("^v\d+\.\d+\.\d+(-\w+(\.\d+)?)?$")]
[ValidateNotNullOrEmpty()]
[string]$ReleaseTag
)
# Add .NET CLI tools to PATH
Find-Dotnet
## We update 'project.assets.json' files with new version tag value by 'GetPSCoreVersionFromGit' target.
$TopProject = (New-PSOptions).Top
if ($ReleaseTag) {
$ReleaseTagToUse = $ReleaseTag -Replace '^v'
dotnet restore $TopProject "/property:ReleaseTag=$ReleaseTagToUse"
} else {
dotnet restore $TopProject
}
try {
Push-Location $PSScriptRoot
@(
'Microsoft.PowerShell.Commands.Management',
'Microsoft.PowerShell.Commands.Utility',
'Microsoft.PowerShell.Commands.Diagnostics',
'Microsoft.PowerShell.ConsoleHost',
'Microsoft.PowerShell.Security',
'System.Management.Automation',
'Microsoft.PowerShell.CoreCLR.Eventing',
'Microsoft.WSMan.Management',
'Microsoft.WSMan.Runtime',
'Microsoft.PowerShell.SDK'
) | ForEach-Object {
if ($ReleaseTag) {
dotnet pack "src/$_" --output $OutputPath "/property:IncludeSymbols=true;ReleaseTag=$ReleaseTagToUse"
} else {
dotnet pack "src/$_" --output $OutputPath
}
}
} finally {
Pop-Location
}
}
function Start-DevPowerShell {
[CmdletBinding(DefaultParameterSetName='ConfigurationParamSet')]
param(
+3 -3
View File
@@ -505,11 +505,10 @@ function Invoke-CIFinish
# only publish assembly nuget packages if it is a daily build and tests passed
if(Test-DailyBuild)
{
Publish-NuGetFeed -OutputPath .\nuget-artifacts -ReleaseTag $preReleaseVersion
$nugetArtifacts = Get-ChildItem .\nuget-artifacts -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName }
$nugetArtifacts = Get-ChildItem $PSScriptRoot\packaging\nugetOutput -ErrorAction SilentlyContinue -Filter *.nupkg | Select-Object -ExpandProperty FullName
if($nugetArtifacts)
{
$artifacts.AddRange($nugetArtifacts)
$artifacts.AddRange(@($nugetArtifacts))
}
}
@@ -523,6 +522,7 @@ function Invoke-CIFinish
$artifacts.Add($arm64Package)
$pushedAllArtifacts = $true
$artifacts | ForEach-Object {
Write-Log -Message "Pushing $_ as CI artifact"
if(Test-Path $_)