diff --git a/.build.ps1 b/.build.ps1 index b1d94d75f..a8b069e89 100644 --- a/.build.ps1 +++ b/.build.ps1 @@ -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." } diff --git a/README.md b/README.md index d8b30ad56..b2d7c7767 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/appveyor.yml b/appveyor.yml index e5582850a..9b394a26b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 } diff --git a/build.ps1 b/build.ps1 index 50c914560..71979ae4f 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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)) {