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

Update Terminal.Gui to 1.16.0, and make psedit compatible again #63

Merged
merged 4 commits into from
May 8, 2024
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
11 changes: 9 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,12 @@ jobs:
with:
dotnet-version: 6.0.x

- name: Build
run: dotnet publish
- name: Build .NET Standard 2.1
run: dotnet build -c Release -f netstandard2.1

- name: Build .NET Framework 4.7.2
run: dotnet build -c Release -f net472

- name: List build artifacts
shell: pwsh
run: Get-ChildItem -Path .\bin\Release -Recurse
9 changes: 6 additions & 3 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
with:
dotnet-version: 6.0.x

- name: Build
run: dotnet publish -o psedit
- name: Build .NET Standard 2.1
run: dotnet build -c Release -f netstandard2.1

- name: Build .NET Framework 4.7.2
run: dotnet build -c Release -f net472

- name: Release
run: Publish-Module -Path .\psedit -NuGetApiKey $Env:APIKEY
run: Publish-Module -Path .\bin\Release -NuGetApiKey $Env:APIKEY
env:
APIKEY: ${{ secrets.APIKEY }}
shell: pwsh
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"-Command",
"& { Import-Module .\\psedit.psd1; Show-PSEditor}"
],
"cwd": "${workspaceFolder}\\bin\\Debug\\netstandard2.0\\publish",
"cwd": "${workspaceFolder}\\bin\\Debug",
"console": "externalTerminal",
"stopAtEntry": false
},
Expand All @@ -30,7 +30,7 @@
"-Command",
"& { Import-Module .\\psedit.psd1; Show-PSEditor}"
],
"cwd": "${workspaceFolder}\\bin\\Debug\\netstandard2.0\\publish",
"cwd": "${workspaceFolder}\\bin\\Debug",
"console": "externalTerminal",
"stopAtEntry": false
},
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"command": "dotnet",
"type": "shell",
"args": [
"publish",
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
Expand Down
43 changes: 36 additions & 7 deletions psedit.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageReference Include="Terminal.Gui" Version="1.10.0" />
<PackageReference Include="Terminal.Gui" Version="1.16.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
<None Include="psedit.psd1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- Output paths for Debug configuration -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Debug|netstandard2.1'">
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputPath>bin\Debug\coreclr\</OutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Debug|net472'">
<OutputPath>bin\Debug\clr\</OutputPath>
</PropertyGroup>

<Target Name="CopyAdditionalFiles" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug'">
<!-- Copy psedit.psd1 to the root output directory -->
<Copy SourceFiles="psedit.psd1"
DestinationFolder="bin\Debug"
SkipUnchangedFiles="true" />
</Target>

<!-- Output paths for Release configuration -->
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Release|netstandard2.1'">
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputPath>bin\Release\coreclr\</OutputPath>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)'=='Release|net472'">
<OutputPath>bin\Release\clr\</OutputPath>
</PropertyGroup>

<Target Name="CopyAdditionalFilesRelease" AfterTargets="Build" Condition="'$(Configuration)' == 'Release'">
<!-- Copy psedit.psd1 to the root output directory -->
<Copy SourceFiles="psedit.psd1"
DestinationFolder="bin\Release"
SkipUnchangedFiles="true" />
</Target>

</Project>
10 changes: 8 additions & 2 deletions psedit.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
@{

# Script module or binary module file associated with this manifest.
RootModule = 'psedit.dll'

RootModule = if($PSEdition -eq 'Core')
{
'coreclr\psedit.dll'
}
else # Desktop
{
'clr\psedit.dll'
}
# Version number of this module.
ModuleVersion = '0.0.6'

Expand Down
Loading