Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix packages #258

Merged
merged 5 commits into from
Feb 26, 2025
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
10 changes: 4 additions & 6 deletions .pipelines/ConsoleGuiTools-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
# Support: https://aka.ms/onebranchsup #
#################################################################################

trigger: none
trigger:
- main

schedules:
- cron: '50 19 * * 3'
Expand Down Expand Up @@ -76,10 +77,7 @@ extends:
inputs:
packageType: sdk
useGlobalJson: true
- pwsh: |
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
Install-Module -Repository CFS -Name Microsoft.PowerShell.PSResourceGet
./tools/installPSResources.ps1 -PSRepository CFS
- pwsh: ./tools/installPSResources.ps1 -PSRepository CFS
displayName: Install PSResources
- pwsh: Invoke-Build -Configuration $(BuildConfiguration)
displayName: Build
Expand Down Expand Up @@ -119,7 +117,7 @@ extends:
files_to_sign: "*.nupkg"
- stage: release
dependsOn: build
condition: ne(variables['Build.Reason'], 'Schedule')
condition: eq(variables['Build.Reason'], 'Manual')
variables:
version: $[ stageDependencies.build.main.outputs['package.version'] ]
drop: $(Pipeline.Workspace)/drop_build_main
Expand Down
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<ItemGroup>
<PackageVersion Include="Microsoft.PowerShell.SDK" Version="7.4.7" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Nstack.Core" Version="1.1.1" />
<PackageVersion Include="Terminal.Gui" Version="1.17.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.425",
"version": "8.0.405",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\ConsoleGuiTools.Common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -15,9 +15,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nstack.Core" Version="1.1.1" />
<PackageReference Include="Terminal.Gui" Version="1.17.1" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.2.23" />
<PackageReference Include="Nstack.Core" />
<PackageReference Include="Terminal.Gui" />
<PackageReference Include="Microsoft.PowerShell.SDK" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\ConsoleGuiTools.Common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Newtonsoft.Json" />
</ItemGroup>
</Project>
17 changes: 14 additions & 3 deletions tools/installPSResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,19 @@ param(
)

if ($PSRepository -eq "CFS" -and -not (Get-PSResourceRepository -Name CFS -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json"
Register-PSResourceRepository -Name CFS -Uri "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/PowerShellGalleryMirror/nuget/v3/index.json"
}

Install-PSResource -Repository $PSRepository -TrustRepository -Name InvokeBuild
Install-PSResource -Repository $PSRepository -TrustRepository -Name platyPS
# NOTE: Due to a bug in Install-PSResource with upstream feeds, we have to
# request an exact version. Otherwise, if a newer version is available in the
# upstream feed, it will fail to install any version at all.
Install-PSResource -Verbose -TrustRepository -RequiredResource @{
InvokeBuild = @{
version = "5.12.1"
repository = $PSRepository
}
platyPS = @{
version = "0.14.2"
repository = $PSRepository
}
}
Loading