Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions tools/ci.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand All @@ -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 $_)
Expand Down