mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Publish windows daily build to MyGet (#9288)
This commit is contained in:
-46
@@ -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
@@ -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 $_)
|
||||
|
||||
Reference in New Issue
Block a user