mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 07:47:54 +01:00
Remove PowerShell module for analyzers
This commit is contained in:
@@ -1,117 +0,0 @@
|
||||
#
|
||||
# Module manifest for module 'Terminal.Gui.Powershell.Analyzers'
|
||||
#
|
||||
# Generated by: Brandon Thetford (GitHub @dodexahedron)
|
||||
#
|
||||
# Generated on: 4/24/2024
|
||||
#
|
||||
|
||||
@{
|
||||
|
||||
# Script module or binary module file associated with this manifest.
|
||||
RootModule = ''
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '1.0.0'
|
||||
|
||||
# Supported PSEditions
|
||||
CompatiblePSEditions = @('Core')
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '3e85001d-6539-4cf1-b71c-ec9e983f7fc8'
|
||||
|
||||
# Author of this module
|
||||
Author = 'Brandon Thetford (GitHub @dodexahedron)'
|
||||
|
||||
# Company or vendor of this module
|
||||
CompanyName = 'The Terminal.Gui Project'
|
||||
|
||||
# Copyright statement for this module
|
||||
Copyright = '(c) Brandon Thetford (GitHub @dodexahedron). Provided to the Terminal.Gui project and you under the terms of the MIT License.'
|
||||
|
||||
# Description of the functionality provided by this module
|
||||
Description = 'Operations involving Terminal.Gui analyzer projects, fur use during development of Terminal.Gui'
|
||||
|
||||
# Minimum version of the PowerShell engine required by this module
|
||||
PowerShellVersion = '7.4.0'
|
||||
|
||||
# Name of the PowerShell host required by this module
|
||||
PowerShellHostName = 'ConsoleHost'
|
||||
|
||||
# Minimum version of the PowerShell host required by this module
|
||||
# PowerShellHostVersion = ''
|
||||
|
||||
# Processor architecture (None, X86, Amd64) required by this module
|
||||
ProcessorArchitecture = ''
|
||||
|
||||
# Modules that must be imported into the global environment prior to importing this module
|
||||
RequiredModules = @('Microsoft.PowerShell.Management','Microsoft.PowerShell.Utility','./Terminal.Gui.PowerShell.Core.psd1')
|
||||
|
||||
# Assemblies that must be loaded prior to importing this module
|
||||
# RequiredAssemblies = @()
|
||||
|
||||
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
|
||||
# ScriptsToProcess = @()
|
||||
|
||||
# Type files (.ps1xml) to be loaded when importing this module
|
||||
# TypesToProcess = @()
|
||||
|
||||
# Format files (.ps1xml) to be loaded when importing this module
|
||||
# FormatsToProcess = @()
|
||||
|
||||
# Modules to import as nested modules.
|
||||
NestedModules = @('./Terminal.Gui.PowerShell.Analyzers.psm1')
|
||||
|
||||
# Functions to export from this module.
|
||||
FunctionsToExport = @('Build-Analyzers')
|
||||
|
||||
# Cmdlets to export from this module.
|
||||
CmdletsToExport = @()
|
||||
|
||||
# Variables to export from this module
|
||||
VariablesToExport = @()
|
||||
|
||||
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
|
||||
AliasesToExport = @()
|
||||
|
||||
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
|
||||
PrivateData = @{
|
||||
|
||||
PSData = @{
|
||||
|
||||
# Tags applied to this module. These help with module discovery in online galleries.
|
||||
# Tags = @()
|
||||
|
||||
# A URL to the license for this module.
|
||||
LicenseUri = 'https://github.com/gui-cs/Terminal.Gui/Scripts/COPYRIGHT'
|
||||
|
||||
# A URL to the main website for this project.
|
||||
ProjectUri = 'https://github.com/gui-cs/Terminal.Gui'
|
||||
|
||||
# A URL to an icon representing this module.
|
||||
# IconUri = ''
|
||||
|
||||
# ReleaseNotes of this module
|
||||
# ReleaseNotes = ''
|
||||
|
||||
# Prerelease string of this module
|
||||
# Prerelease = ''
|
||||
|
||||
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
|
||||
# RequireLicenseAcceptance = $false
|
||||
|
||||
# External dependent modules of this module
|
||||
# ExternalModuleDependencies = @()
|
||||
|
||||
} # End of PSData hashtable
|
||||
|
||||
} # End of PrivateData hashtable
|
||||
|
||||
# HelpInfo URI of this module
|
||||
# HelpInfoURI = ''
|
||||
|
||||
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
|
||||
# DefaultCommandPrefix = ''
|
||||
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Builds all analyzer projects in Debug and Release configurations.
|
||||
.DESCRIPTION
|
||||
Uses dotnet build to build all analyzer projects, with optional behavior changes via switch parameters.
|
||||
.PARAMETER AutoClose
|
||||
Automatically close running Visual Studio processes which have the Terminal.sln solution loaded, before taking any other actions.
|
||||
.PARAMETER AutoLaunch
|
||||
Automatically start a new Visual Studio process and load the solution after completion.
|
||||
.PARAMETER Force
|
||||
Carry out operations unconditionally and do not prompt for confirmation.
|
||||
.PARAMETER NoClean
|
||||
Do not delete the bin and obj folders before building the analyzers. Usually best not to use this, but can speed up the builds slightly.
|
||||
.PARAMETER Quiet
|
||||
Write less text output to the terminal.
|
||||
.INPUTS
|
||||
None
|
||||
.OUTPUTS
|
||||
None
|
||||
#>
|
||||
Function Build-Analyzers {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory=$false, HelpMessage="Automatically close running Visual Studio processes which have the Terminal.sln solution loaded, before taking any other actions.")]
|
||||
[switch]$AutoClose,
|
||||
[Parameter(Mandatory=$false, HelpMessage="Automatically start a new Visual Studio process and load the solution after completion.")]
|
||||
[switch]$AutoLaunch,
|
||||
[Parameter(Mandatory=$false, HelpMessage="Carry out operations unconditionally and do not prompt for confirmation.")]
|
||||
[switch]$Force,
|
||||
[Parameter(Mandatory=$false, HelpMessage="Do not delete the bin and obj folders before building the analyzers.")]
|
||||
[switch]$NoClean,
|
||||
[Parameter(Mandatory=$false, HelpMessage="Write less text output to the terminal.")]
|
||||
[switch]$Quiet
|
||||
)
|
||||
|
||||
if($AutoClose) {
|
||||
if(!$Quiet) {
|
||||
Write-Host Closing Visual Studio processes
|
||||
}
|
||||
Close-Solution
|
||||
}
|
||||
|
||||
if($Force){
|
||||
$response = 'Y'
|
||||
}
|
||||
elseif(!$Force && $NoClean){
|
||||
$response = ($r = Read-Host "Pre-build Terminal.Gui.InternalAnalyzers without removing old build artifacts? [Y/n]") ? $r : 'Y'
|
||||
}
|
||||
else{
|
||||
$response = ($r = Read-Host "Delete bin and obj folders for Terminal.Gui and Terminal.Gui.InternalAnalyzers and pre-build Terminal.Gui.InternalAnalyzers? [Y/n]") ? $r : 'Y'
|
||||
}
|
||||
|
||||
if (($response -ne 'Y')) {
|
||||
Write-Host Took no action
|
||||
return
|
||||
}
|
||||
|
||||
Push-Location $InternalAnalyzersProjectDirectory
|
||||
|
||||
if(!$NoClean) {
|
||||
if(!$Quiet) {
|
||||
Write-Host Deleting bin and obj folders for Terminal.Gui
|
||||
}
|
||||
Remove-Item -Recurse -Force $TerminalGuiProjectDirectory/bin -ErrorAction SilentlyContinue
|
||||
Remove-Item -Recurse -Force $TerminalGuiProjectDirectory/obj -ErrorAction SilentlyContinue
|
||||
|
||||
if(!$Quiet) {
|
||||
Write-Host Deleting bin and obj folders for Terminal.Gui.InternalAnalyzers
|
||||
}
|
||||
Remove-Item -Recurse -Force $InternalAnalyzersProjectDirectory/bin -ErrorAction SilentlyContinue
|
||||
Remove-Item -Recurse -Force $InternalAnalyzersProjectDirectory/obj -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
if(!$Quiet) {
|
||||
Write-Host Building analyzers in Debug configuration
|
||||
}
|
||||
dotnet build $InternalAnalyzersProjectFilePath --no-incremental --nologo --force --configuration Debug
|
||||
|
||||
if(!$Quiet) {
|
||||
Write-Host Building analyzers in Release configuration
|
||||
}
|
||||
dotnet build $InternalAnalyzersProjectFilePath --no-incremental --nologo --force --configuration Release
|
||||
|
||||
Pop-Location
|
||||
|
||||
if(!$AutoLaunch) {
|
||||
Write-Host -ForegroundColor Green Finished. Restart Visual Studio for changes to take effect.
|
||||
} else {
|
||||
if(!$Quiet) {
|
||||
Write-Host -ForegroundColor Green Finished. Re-loading Terminal.sln.
|
||||
}
|
||||
Open-Solution
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
@@ -69,9 +69,6 @@ Function Set-PowerShellEnvironment {
|
||||
New-Variable -Name SolutionFilePath -Value (Join-Path -Resolve $RepositoryRootDirectory "Terminal.sln") -Option ReadOnly -Scope Global -Visibility Public
|
||||
New-Variable -Name TerminalGuiProjectDirectory -Value (Join-Path -Resolve $RepositoryRootDirectory "Terminal.Gui") -Option ReadOnly -Scope Global -Visibility Public
|
||||
New-Variable -Name TerminalGuiProjectFilePath -Value (Join-Path -Resolve $TerminalGuiProjectDirectory "Terminal.Gui.csproj") -Option ReadOnly -Scope Global -Visibility Public
|
||||
New-Variable -Name AnalyzersDirectory -Value (Join-Path -Resolve $RepositoryRootDirectory "Analyzers") -Option ReadOnly -Scope Global -Visibility Public
|
||||
New-Variable -Name InternalAnalyzersProjectDirectory -Value (Join-Path -Resolve $AnalyzersDirectory "Terminal.Gui.Analyzers.Internal") -Option ReadOnly -Scope Global -Visibility Public
|
||||
New-Variable -Name InternalAnalyzersProjectFilePath -Value (Join-Path -Resolve $InternalAnalyzersProjectDirectory "Terminal.Gui.Analyzers.Internal.csproj") -Option ReadOnly -Scope Global -Visibility Public
|
||||
|
||||
# Save existing PSModulePath for optional reset later.
|
||||
# If it is already saved, do not overwrite, but continue anyway.
|
||||
@@ -137,9 +134,6 @@ Function Reset-PowerShellEnvironment {
|
||||
Remove-Variable -Name TerminalGuiProjectDirectory -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
Remove-Variable -Name TerminalGuiProjectFilePath -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
Remove-Variable -Name ScriptsDirectory -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
Remove-Variable -Name AnalyzersDirectory -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
Remove-Variable -Name InternalAnalyzersProjectDirectory -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
Remove-Variable -Name InternalAnalyzersProjectFilePath -Scope Global -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# This ensures the environment is reset when unloading the module.
|
||||
|
||||
@@ -81,7 +81,7 @@ RequiredModules = @(
|
||||
|
||||
# Modules to import as nested modules of this module.
|
||||
# This module is just a shortcut that loads all of our modules.
|
||||
NestedModules = @('./Terminal.Gui.PowerShell.Core.psd1', './Terminal.Gui.PowerShell.Analyzers.psd1', './Terminal.Gui.PowerShell.Git.psd1', './Terminal.Gui.PowerShell.Build.psd1')
|
||||
NestedModules = @('./Terminal.Gui.PowerShell.Core.psd1', './Terminal.Gui.PowerShell.Git.psd1', './Terminal.Gui.PowerShell.Build.psd1')
|
||||
|
||||
# Functions to export from this module.
|
||||
# Not filtered, so exports all functions exported by all nested modules.
|
||||
|
||||
Reference in New Issue
Block a user