Skip to content

Commit

Permalink
Merge pull request #247 from PowerShell/OBP_Official_andschwa_fyprNM
Browse files Browse the repository at this point in the history
Migrate build and publish system
andyleejordan authored May 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 2e566d0 + 031531c commit d2abc00
Showing 35 changed files with 643 additions and 1,585 deletions.
8 changes: 8 additions & 0 deletions .config/tsaoptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"instanceUrl": "https://msazure.visualstudio.com",
"projectName": "One",
"areaPath": "One\\MGMT\\Compute\\Powershell\\Powershell",
"notificationAliases": [ "[email protected]", "[email protected]" ],
"codebaseName": "PowerShell_ConsoleGuiTools_20240404",
"tools": [ "CredScan", "PoliCheck", "BinSkim" ]
}
51 changes: 51 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:
types: [ checks_requested ]

jobs:
ci:
name: dotnet
strategy:
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
cache: true
cache-dependency-path: '**/*.csproj'

- name: Install PSResources
shell: pwsh
run: ./tools/installPSResources.ps1

- name: Build and test
shell: pwsh
run: Invoke-Build -Configuration Release Build, Package

- name: Upload module
if: always()
uses: actions/upload-artifact@v4
with:
name: ConsoleGuiTools-module-${{ matrix.os }}
path: module

- name: Upload NuGet package
uses: actions/upload-artifact@v4
with:
name: ConsoleGuiTools-nupkg-${{ matrix.os }}
path: out/*.nupkg
51 changes: 5 additions & 46 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,6 @@
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/

# Rider
.idea

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn

#Module build
module/

# Visual Studio 2015
.vs/

# ingore downloaded .NET
.dotnet

# Ignore package
Microsoft.PowerShell.GraphicalTools.zip
Microsoft.PowerShell.ConsoleGuiTools.zip

# git artifacts
*.orig
out/
bin/
obj/
publish/
*.sln
164 changes: 164 additions & 0 deletions .pipelines/ConsoleGuiTools-Official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
#################################################################################
# OneBranch Pipelines #
# This pipeline was created by EasyStart from a sample located at: #
# https://aka.ms/obpipelines/easystart/samples #
# Documentation: https://aka.ms/obpipelines #
# Yaml Schema: https://aka.ms/obpipelines/yaml/schema #
# Retail Tasks: https://aka.ms/obpipelines/tasks #
# Support: https://aka.ms/onebranchsup #
#################################################################################

trigger: none

parameters:
- name: debug
displayName: Enable debug output
type: boolean
default: false

variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false

resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main

extends:
# https://aka.ms/obpipelines/templates
template: v2/OneBranch.Official.CrossPlat.yml@templates
parameters:
globalSdl: # https://aka.ms/obpipelines/sdl
asyncSdl:
enabled: true
forStages: [build]
stages:
- stage: build
jobs:
- job: main
displayName: Build package
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- pwsh: |
$data = Import-PowerShellDataFile -Path src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$($data.ModuleVersion)"
name: package
displayName: Get version from project properties
- task: onebranch.pipeline.version@1
displayName: Set OneBranch version
inputs:
system: Custom
customVersion: $(package.version)
- task: UseDotNet@2
displayName: Use .NET SDK
inputs:
packageType: sdk
useGlobalJson: true
- task: PowerShell@2
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- pwsh: Invoke-Build -Configuration $(BuildConfiguration)
displayName: Build
- task: onebranch.pipeline.signing@1
displayName: Sign 1st-party files
inputs:
command: sign
signing_profile: external_distribution
search_root: $(Build.SourcesDirectory)/module
files_to_sign: |
*.psd1;
Microsoft.PowerShell.*.dll;
- task: onebranch.pipeline.signing@1
displayName: Sign 3rd-party files
inputs:
command: sign
signing_profile: 135020002
search_root: $(Build.SourcesDirectory)/module
files_to_sign: |
NStack.dll;
Terminal.Gui.dll;
- task: ArchiveFiles@2
displayName: Zip module
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/module
includeRootFolder: false
archiveType: zip
archiveFile: out/ConsoleGuiTools-v$(package.version).zip
- pwsh: Invoke-Build -Configuration $(BuildConfiguration) Package
displayName: Package module
- task: onebranch.pipeline.signing@1
displayName: Sign NuGet package
inputs:
command: sign
signing_profile: external_distribution
search_root: $(Build.SourcesDirectory)/out
files_to_sign: "*.nupkg"
- stage: release
dependsOn: build
variables:
version: $[ stageDependencies.build.main.outputs['package.version'] ]
drop: $(Pipeline.Workspace)/drop_build_main
jobs:
- job: github
displayName: Publish draft to GitHub
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- download: current
displayName: Download artifacts
- task: GitHubRelease@1
displayName: Create GitHub release
inputs:
gitHubConnection: GitHub
repositoryName: PowerShell/ConsoleGuiTools
assets: |
$(drop)/Microsoft.PowerShell.ConsoleGuiTools.$(version).nupkg
$(drop)/ConsoleGuiTools-v$(version).zip
tagSource: userSpecifiedTag
tag: v$(version)
isDraft: true
addChangeLog: false
releaseNotesSource: inline
releaseNotesInline: "<!-- TODO: Generate release notes on GitHub! -->"
- job: validation
displayName: Manual validation
pool:
type: agentless
timeoutInMinutes: 1440
steps:
- task: ManualValidation@0
displayName: Wait 24 hours for validation
inputs:
notifyUsers: $(Build.RequestedForEmail)
instructions: Please validate the release and then publish it!
timeoutInMinutes: 1440
- job: publish
dependsOn: validation
displayName: Publish to PowerShell Gallery
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- download: current
displayName: Download artifacts
- task: NuGetCommand@2
displayName: Publish ConsoleGuiTools to PowerShell Gallery
inputs:
command: push
packagesToPush: $(drop)/Microsoft.PowerShell.ConsoleGuiTools.$(version).nupkg
publishFeedCredentials: PowerShellGallery
32 changes: 0 additions & 32 deletions .vscode/launch.json

This file was deleted.

5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

22 changes: 0 additions & 22 deletions .vscode/tasks.json

This file was deleted.

31 changes: 0 additions & 31 deletions .vsts-ci/azure-pipelines-ci.yml

This file was deleted.

76 changes: 0 additions & 76 deletions .vsts-ci/azure-pipelines-release.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .vsts-ci/misc-analysis.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .vsts-ci/templates/ci-general.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .vsts-ci/templates/publish-github.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .vsts-ci/templates/publish-markets.yml

This file was deleted.

89 changes: 0 additions & 89 deletions .vsts-ci/templates/release-general.yml

This file was deleted.

58 changes: 0 additions & 58 deletions Build.ps1

This file was deleted.

12 changes: 12 additions & 0 deletions ConsoleGuiTools.Common.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>0.7.6</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Company>Microsoft</Company>
<Copyright>© Microsoft Corporation.</Copyright>
<LangVersion>latest</LangVersion>
<PackageLicenseUrl>https://github.com/PowerShell/ConsoleGuiTools/blob/main/LICENSE.txt</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/PowerShell/ConsoleGuiTools</RepositoryUrl>
</PropertyGroup>
</Project>
56 changes: 56 additions & 0 deletions ConsoleGuiTools.build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

param(
[ValidateSet("Debug", "Release")]
[string]$Configuration = "Debug"
)

task FindDotNet -Before Clean, Build {
Assert (Get-Command dotnet -ErrorAction SilentlyContinue) "The dotnet CLI was not found, please install it: https://aka.ms/dotnet-cli"
$DotnetVersion = dotnet --version
Assert ($?) "The required .NET SDK was not found, please install it: https://aka.ms/dotnet-cli"
Write-Host "Using dotnet $DotnetVersion at path $((Get-Command dotnet).Source)" -ForegroundColor Green
}

task Clean {
Remove-BuildItem ./module, ./out
Push-Location src/Microsoft.PowerShell.ConsoleGuiTools
Invoke-BuildExec { & dotnet clean }
Pop-Location
}

task Build {
New-Item -ItemType Directory -Force ./module | Out-Null

Push-Location src/Microsoft.PowerShell.ConsoleGuiTools
Invoke-BuildExec { & dotnet publish --configuration $Configuration --output publish }
$Assets = $(
"./publish/Microsoft.PowerShell.ConsoleGuiTools.dll",
"./publish/Microsoft.PowerShell.ConsoleGuiTools.psd1",
"./publish/Microsoft.PowerShell.OutGridView.Models.dll",
"./publish/Terminal.Gui.dll",
"./publish/NStack.dll")
$Assets | ForEach-Object {
Copy-Item -Force -Path $_ -Destination ../../module
}
Pop-Location

$Assets = $(
"./README.md",
"./LICENSE.txt",
"./NOTICE.txt")
$Assets | ForEach-Object {
Copy-Item -Force -Path $_ -Destination ./module
}

New-ExternalHelp -Path docs/Microsoft.PowerShell.ConsoleGuiTools -OutputPath module/en-US -Force
}

task Package {
New-Item -ItemType Directory -Force ./out | Out-Null
if (-Not (Get-PSResourceRepository -Name ConsoleGuiTools -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name ConsoleGuiTools -Uri ./out
}
Publish-PSResource -Path ./module -Repository ConsoleGuiTools -Verbose
}

task . Clean, Build
11 changes: 0 additions & 11 deletions GraphicalTools.Common.props

This file was deleted.

176 changes: 0 additions & 176 deletions GraphicalTools.build.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 PowerShell Team
Copyright (c) 2024 PowerShell Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
274 changes: 274 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
NOTICES AND INFORMATION
Do Not Translate or Localize

This software incorporates material from third parties.
Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com,
or you may send a check or money order for US $5.00, including the product name,
the open source component name, platform, and version number, to:

Source Code Compliance Team
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
USA

Notwithstanding any other terms, you may reverse engineer this software to the extent
required to debug changes to any libraries licensed under the GNU Lesser General Public License.

---------------------------------------------------------

NStack.Core 1.1.1 - MIT



MIT License

Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright (c) 2017 Microsoft.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------------------------

---------------------------------------------------------

System.CodeDom 8.0.0 - MIT


Copyright (c) Six Labors
(c) Microsoft Corporation
Copyright (c) Andrew Arnott
Copyright 2019 LLVM Project
Copyright 2018 Daniel Lemire
Copyright (c) .NET Foundation
Copyright (c) 2011, Google Inc.
Copyright (c) 2020 Dan Shechter
(c) 1997-2005 Sean Eron Anderson
Copyright (c) 1998 Microsoft. To
Copyright (c) 2022, Wojciech Mula
Copyright (c) 2017 Yoshifumi Kawai
Copyright (c) 2022, Geoff Langdale
Copyright (c) 2005-2020 Rich Felker
Copyright (c) 2012-2021 Yann Collet
Copyright (c) Microsoft Corporation
Copyright (c) 2007 James Newton-King
Copyright (c) 1991-2022 Unicode, Inc.
Copyright (c) 2013-2017, Alfred Klomp
Copyright 2012 the V8 project authors
Copyright (c) 1999 Lucent Technologies
Copyright (c) 2008-2016, Wojciech Mula
Copyright (c) 2011-2020 Microsoft Corp
Copyright (c) 2015-2017, Wojciech Mula
Copyright (c) 2021 csFastFloat authors
Copyright (c) 2005-2007, Nick Galbreath
Copyright (c) 2015 The Chromium Authors
Copyright (c) 2018 Alexander Chermyanin
Copyright (c) The Internet Society 1997
Portions (c) International Organization
Copyright (c) 2004-2006 Intel Corporation
Copyright (c) 2011-2015 Intel Corporation
Copyright (c) 2013-2017, Milosz Krajewski
Copyright (c) 2016-2017, Matthieu Darbois
Copyright (c) The Internet Society (2003)
Copyright (c) .NET Foundation Contributors
Copyright (c) 2020 Mara Bos <m-ou.se@m-ou.se>
Copyright (c) .NET Foundation and Contributors
Copyright (c) 2012 - present, Victor Zverovich
Copyright (c) 2006 Jb Evain (jbevain@gmail.com)
Copyright (c) 2008-2020 Advanced Micro Devices, Inc.
Copyright (c) 2019 Microsoft Corporation, Daan Leijen
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
Copyright (c) 1995-2022 Jean-loup Gailly and Mark Adler
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors
Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com
Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers
Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip
Copyright (c) 1980, 1986, 1993 The Regents of the University of California
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California
Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


---------------------------------------------------------

---------------------------------------------------------

System.Management 8.0.0 - MIT


Copyright (c) Six Labors
(c) Microsoft Corporation
Copyright (c) Andrew Arnott
Copyright 2019 LLVM Project
Copyright 2018 Daniel Lemire
Copyright (c) .NET Foundation
Copyright (c) 2011, Google Inc.
Copyright (c) 2020 Dan Shechter
(c) 1997-2005 Sean Eron Anderson
Copyright (c) 1998 Microsoft. To
Copyright (c) 2022, Wojciech Mula
Copyright (c) 2017 Yoshifumi Kawai
Copyright (c) 2022, Geoff Langdale
Copyright (c) 2005-2020 Rich Felker
Copyright (c) 2012-2021 Yann Collet
Copyright (c) Microsoft Corporation
Copyright (c) 2007 James Newton-King
Copyright (c) 1991-2022 Unicode, Inc.
Copyright (c) 2013-2017, Alfred Klomp
Copyright 2012 the V8 project authors
Copyright (c) 1999 Lucent Technologies
Copyright (c) 2008-2016, Wojciech Mula
Copyright (c) 2011-2020 Microsoft Corp
Copyright (c) 2015-2017, Wojciech Mula
Copyright (c) 2021 csFastFloat authors
Copyright (c) 2005-2007, Nick Galbreath
Copyright (c) 2015 The Chromium Authors
Copyright (c) 2018 Alexander Chermyanin
Copyright (c) The Internet Society 1997
Portions (c) International Organization
Copyright (c) 2004-2006 Intel Corporation
Copyright (c) 2011-2015 Intel Corporation
Copyright (c) 2013-2017, Milosz Krajewski
Copyright (c) 2016-2017, Matthieu Darbois
Copyright (c) The Internet Society (2003)
Copyright (c) .NET Foundation Contributors
Copyright (c) 2020 Mara Bos <m-ou.se@m-ou.se>
Copyright (c) .NET Foundation and Contributors
Copyright (c) 2012 - present, Victor Zverovich
Copyright (c) 2006 Jb Evain (jbevain@gmail.com)
Copyright (c) 2008-2020 Advanced Micro Devices, Inc.
Copyright (c) 2019 Microsoft Corporation, Daan Leijen
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
Copyright (c) 1995-2022 Jean-loup Gailly and Mark Adler
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors
Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com
Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers
Copyright (c) 2015 THL A29 Limited, a Tencent company, and Milo Yip
Copyright (c) 1980, 1986, 1993 The Regents of the University of California
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 The Regents of the University of California
Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


---------------------------------------------------------

---------------------------------------------------------

System.ValueTuple 4.5.0 - MIT


(c) 2023 GitHub, Inc.
(c) Microsoft Corporation
Copyright (c) 2011, Google Inc.
(c) 1997-2005 Sean Eron Anderson
Copyright (c) 1991-2017 Unicode, Inc.
Copyright (c) 2015 The Chromium Authors
Portions (c) International Organization
Copyright (c) 2004-2006 Intel Corporation
Copyright (c) .NET Foundation Contributors
Copyright (c) .NET Foundation and Contributors
Copyright (c) 2011 Novell, Inc (http://www.novell.com)
Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com)
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors
Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers

The MIT License (MIT)

Copyright (c) .NET Foundation and Contributors

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


---------------------------------------------------------

---------------------------------------------------------

Terminal.Gui 1.16.0 - MIT



MIT License

Copyright (c) 2007-2011 Novell Inc
Copyright (c) 2017 Microsoft Corp

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---------------------------------------------------------
10 changes: 0 additions & 10 deletions NuGet.config

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ This repo contains the `Out-ConsoleGridView`
PowerShell Cmdlet providing console-based GUI experiences based on
[Terminal.Gui (gui.cs)](https://github.com/gui-cs/Terminal.Gui).

_Note:_ A module named `Microsoft.PowerShell.GraphicalTools` used to be built and published out of this repo, but per [#101](https://github.com/PowerShell/GraphicalTools/issues/101) it is deprecated and unmaintained until such time that it can be rewritten on top of [.NET MAUI](https://devblogs.microsoft.com/dotnet/introducing-net-multi-platform-app-ui/).
_Note:_ A module named `Microsoft.PowerShell.GraphicalTools` used to be built and published out of this repo, but per [#101](https://github.com/PowerShell/ConsoleGuiTools/issues/101) it is deprecated and unmaintained until such time that it can be rewritten on top of [.NET MAUI](https://devblogs.microsoft.com/dotnet/introducing-net-multi-platform-app-ui/).

## Installation

@@ -149,7 +149,7 @@ Install PowerShell 7.2+ with [these instructions](https://github.com/PowerShell/
### 2. Clone the GitHub repository

```powershell
git clone https://github.com/PowerShell/GraphicalTools.git
git clone https://github.com/PowerShell/ConsoleGuiTools.git
```

### 3. Install [Invoke-Build](https://github.com/nightroman/Invoke-Build)
@@ -163,7 +163,7 @@ Now you're ready to build the code. You can do so in one of two ways:
### 4. Building the code from PowerShell

```powershell
pushd ./GraphicalTools
pushd ./ConsoleGuiTools
Invoke-Build Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools
popd
```
@@ -188,7 +188,7 @@ exit
### 5. Debugging in Visual Studio Code

```powershell
code ./GraphicalTools
code ./ConsoleGuiTools
```

Build by hitting `Ctrl-Shift-B` in VS Code.
@@ -207,7 +207,7 @@ Your breakpoint should be hit.

We would love to incorporate community contributions into this project. If
you would like to contribute code, documentation, tests, or bug reports,
please read the [development section above](https://github.com/PowerShell/GraphicalTools#development)
please read the [development section above](https://github.com/PowerShell/ConsoleGuiTools#development)
to learn more.

## Microsoft.PowerShell.ConsoleGuiTools Architecture
@@ -237,4 +237,4 @@ For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [open
[conduct-code]: https://opensource.microsoft.com/codeofconduct/
[conduct-FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
[conduct-email]: mailto:opencode@microsoft.com
[conduct-md]: https://github.com/PowerShell/GraphicalTools/tree/master/CODE_OF_CONDUCT.md
[conduct-md]: https://github.com/PowerShell/ConsoleGuiTools/tree/master/CODE_OF_CONDUCT.md
346 changes: 0 additions & 346 deletions docs/Microsoft.PowerShell.GraphicalTools/Out-GridView.md

This file was deleted.

8 changes: 6 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"sdk": {
"version": "6.0.416"
"version": "6.0.420",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}
}


7 changes: 7 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="PowerShellCore_PublicPackages" value="https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json" />
</packageSources>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\GraphicalTools.Common.props" />
<Import Project="..\..\ConsoleGuiTools.Common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
Original file line number Diff line number Diff line change
@@ -9,8 +9,7 @@
RootModule = 'Microsoft.PowerShell.ConsoleGuiTools.dll'

# Version number of this module.
# NOTE: This will get updated by build.ps1; the build number will be incremented for each build.
ModuleVersion = '0.7.6.1'
ModuleVersion = '0.7.6'

# Supported PSEditions
CompatiblePSEditions = @( 'Core' )
@@ -28,7 +27,7 @@ CompanyName = 'Microsoft'
Copyright = '(c) Microsoft Corporation.'

# Description of the functionality provided by this module
Description = 'Cross-platform Console Gui Tools for PowerShell'
Description = 'Cross-platform Console GUI Tools for PowerShell'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '7.2'
@@ -96,120 +95,16 @@ PrivateData = @{
Tags = @('Console', 'Gui', 'Out-GridView', 'Out-ConsoleGridView', 'Show-ObjectTree', 'Terminal.Gui', 'gui.cs', 'MacOS', 'Windows', 'Linux', 'PSEdition_Core')

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShell/GraphicalTools/blob/master/LICENSE.txt'
LicenseUri = 'https://github.com/PowerShell/ConsoleGuiTools/blob/master/LICENSE.txt'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/PowerShell/GraphicalTools/'
ProjectUri = 'https://github.com/PowerShell/ConsoleGuiTools/'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '# Release Notes
## v0.7.6
* Fix child expand #223
## v0.7.5
* Adds Show-ObjectTree cmdlet #179
* Fix clear last line on Windows Terminal Issue again #207
* Adds support for -Diagnostic switch to Out-ConsoleGridView #208
* Adds support for -UseNetDriver switch to Out-ConsoleGridView #208
## v0.7.4
* Fixes last line not cleared on exit in WT by updating to Terminal.Gui v1.13.5 #205
## v0.7.3
* Build updates and compliant release pipeline #168
* Updates ConsoleGuiTools to Terminal.Gui v1.10 #184
* Fixes #175. Column headers misaligned #185
* Fixes# 148. Move to next row on select #187
* Fixes #174. Changing Filter does not undo previously marked items #186
* Marked are now at top; simplified code; fixed margin #188
* Fixes #189 - Fixed typo in exception text. Added -verbose to launch.json #190
* Fixes #195 - Incompatible with OpenSUS #196
* Bump Newtonsoft.Json from 13.0.1 to 13.0.3 #198
* Bump Newtonsoft.Json from 13.0.1 to 13.0.3 #200
* Bump Microsoft.PowerShell.SDK from 7.2.6 to 7.2.13 #199
* Bump Terminal.Gui from 1.13 to 1.13.4 #197
* Remove PDB files from module #201
## v0.7.2
* Update Terminal.Gui to v1.7.1 #161
* Filter edit chops off first char of filter string passed on command line #151
* Color changes and terminal becomes unreadable #150
If items are selected, then a filter is applied, items now hidden stay selected #121
* Add UI for select-all/select-none #120
* Add ability to minimize UI #116
* Initial focus should be on the results (ListView) #87
* Import-Module causes warning on PowerShell 7 RC3 #44
* Runaway process on Ubuntu 20.4 displaying random characters upon exit. #139
* PSAnsiRenderingFileInfo causes display issues with Out-ConsoleGridView #159
* Removes building and distribution of Out-GridView and the other Avalonia-based components
* Remove ANSI escape sequences from property values #158
## v0.7.0
Upgraded to PowerShell 7.2 and .NET target framework `net60`
Updated Terminal.Gui to 1.7
Fixed #131 - Strip ANSI
## v0.6.3
Unreleased!
## v0.6.2
Update Terminal.Gui to 1.0.
Disable mouse mode to fix bug with mouse movement being printed to console.
Gracefully fail when running in remote sessions.
## v0.6.1
Fix off-by-one error with ellipsis so columns should be better aligned.
## v0.6.0
Now supports `-Filter` parameter.
Updated to use the final release of `Terminal.Gui` v0.90 (which is feature complete for 1.0).
## v0.5.0
`Out-ConsoleGridView` has been totally refactored!
First off, no more silly F9 menu to accept!
All you have to do is hit `ENTER` to accept your selection or `ESC` to cancel.
Also, `-OutputMode` works as expected now. `Single` lets you only select one item. `Multiple` is the default.
## v0.4.1
* Fix filter indexing to return correct selected objects
## v0.4.0
* Regex filter
* Newlines rendering fix (Thanks @tig!)
## v0.3.0
* Windows OS support (PS 6.2+)
* dynamic column widths
* Fix arrow key issue on non-Windows
## v0.2.0
Initial Release
'
ReleaseNotes = 'Please see release notes at: https://github.com/PowerShell/ConsoleGuiTools/releases'

# Prerelease string of this module
# Prerelease = ''
16 changes: 0 additions & 16 deletions src/Microsoft.PowerShell.ConsoleGuiTools/ModuleLayout.psd1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\GraphicalTools.Common.props" />
<Import Project="..\..\ConsoleGuiTools.Common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
12 changes: 0 additions & 12 deletions tools/azurePipelinesBuild.ps1

This file was deleted.

14 changes: 14 additions & 0 deletions tools/installPSResources.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

$ErrorActionPreference = 'Stop'

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null
if ($PSVersionTable.PSVersion.Major -lt 6) {
throw "The build script requires PowerShell 7!"
}

# TODO: Switch to Install-PSResource when CI uses PowerShell 7.4
Install-Module -Name InvokeBuild -Scope CurrentUser
Install-Module -Name platyPS -Scope CurrentUser
Install-Module -Name Microsoft.PowerShell.PSResourceGet -Scope CurrentUser
379 changes: 0 additions & 379 deletions tools/terms/FileTypeSet.xml

This file was deleted.

12 changes: 0 additions & 12 deletions tools/terms/UserExclusions.xml

This file was deleted.

32 changes: 32 additions & 0 deletions tools/updateVersion.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

param(
[Parameter(Mandatory)]
[semver]$Version,

[Parameter(Mandatory)]
[string]$Changes
)

git diff --staged --quiet --exit-code
if ($LASTEXITCODE -ne 0) {
throw "There are staged changes in the repository. Please commit or reset them before running this script."
}

$v = "$($Version.Major).$($Version.Minor).$($Version.Patch)"

$Path = "ConsoleGuiTools.Common.props"
$f = Get-Content -Path $Path
$f = $f -replace '^(?<prefix>\s+<VersionPrefix>)(.+)(?<suffix></VersionPrefix>)$', "`${prefix}${v}`${suffix}"
$f = $f -replace '^(?<prefix>\s+<VersionSuffix>)(.*)(?<suffix></VersionSuffix>)$', "`${prefix}$($Version.PreReleaseLabel)`${suffix}"
$f | Set-Content -Path $Path
git add $Path

$Path = "src/Microsoft.PowerShell.ConsoleGuiTools/Microsoft.PowerShell.ConsoleGuiTools.psd1"
$f = Get-Content -Path $Path
$f = $f -replace "^(?<prefix>ModuleVersion\s+=\s+')(.+)(?<suffix>')`$", "`${prefix}${v}`${suffix}"
$f | Set-Content -Path $Path
git add $Path

git commit --edit --message "v$($Version): $Changes"

0 comments on commit d2abc00

Please sign in to comment.