Skip to content

Commit

Permalink
Upgrade platyPS from Version 0.5 to 0.9 (#869)
Browse files Browse the repository at this point in the history
* Upgrade to platyPS Version 0.9

* improve check, error message and spelling in build tools (and a PSSA warning about incorrect comparison with $null

* fix wrong version number
  • Loading branch information
bergmeister authored and JamesWTruher committed Feb 9, 2018
1 parent d432e00 commit 54c4bf7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ task buildDocs -Inputs $bdInputs -Outputs $bdOutputs {
Copy-Item -Path $docsPath\about_PSScriptAnalyzer.help.txt -Destination $outputDocsPath -Force

# Build documentation using platyPS
if ((Get-Module PlatyPS -ListAvailable) -eq $null) {
throw "Cannot find PlatyPS. Please install it from https://www.powershellgallery.com."
if ($null -eq (Get-Module platyPS -ListAvailable -Verbose:$verbosity | Where-Object { $_.Version -ge 0.9 })) {
throw "Cannot find platyPS of version greater or equal to 0.9. Please install it from https://www.powershellgallery.com/packages/platyPS/ using e.g. the following command: Install-Module platyPS"
}
Import-Module PlatyPS
Import-Module platyPS
if (-not (Test-Path $markdownDocsPath -Verbose:$verbosity)) {
throw "Cannot find markdown documentation folder."
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Exit
### From Source

* [.NET Core 2.1.4 SDK](https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.5-download.md)
* [PlatyPS 0.5.0 or greater](https://github.com/PowerShell/platyPS)
* [PlatyPS 0.9.0 or greater](https://github.com/PowerShell/platyPS/releases)
* Optionally but recommended for development: [Visual Studio 2017](https://www.visualstudio.com/downloads/)

#### Steps
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cache:

# Install Pester
install:
- ps: nuget install platyPS -Version 0.5.0 -source https://www.powershellgallery.com/api/v2 -outputDirectory "$Env:ProgramFiles\WindowsPowerShell\Modules\." -ExcludeVersion
- ps: nuget install platyPS -Version 0.9.0 -source https://www.powershellgallery.com/api/v2 -outputDirectory "$Env:ProgramFiles\WindowsPowerShell\Modules\." -ExcludeVersion
- ps: |
$requiredPesterVersion = '3.4.0'
$pester = Get-Module Pester -ListAvailable | Where-Object { $_.Version -eq $requiredPesterVersion }
Expand Down
8 changes: 4 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ if ($BuildDocs)
Copy-Item -Path $docsPath\about_PSScriptAnalyzer.help.txt -Destination $outputDocsPath -Force -Verbose:$verbosity

# Build documentation using platyPS
if ((Get-Module PlatyPS -ListAvailable -Verbose:$verbosity) -eq $null)
if ($null -eq (Get-Module platyPS -ListAvailable -Verbose:$verbosity | Where-Object { $_.Version -ge 0.5 }))
{
throw "Cannot find PlatyPS. Please install it from https://www.powershellgallery.com."
"Cannot find platyPS. Please install it from https://www.powershellgallery.com/packages/platyPS/ using e.g. the following command: Install-Module platyPS"
}
if ((Get-Module PlatyPS -Verbose:$verbosity) -eq $null)
if ((Get-Module platyPS -Verbose:$verbosity) -eq $null)
{
Import-Module PlatyPS -Verbose:$verbosity
Import-Module platyPS -Verbose:$verbosity
}
if (-not (Test-Path $markdownDocsPath -Verbose:$verbosity))
{
Expand Down

0 comments on commit 54c4bf7

Please sign in to comment.