Skip to content

Commit 90e7957

Browse files
committed
Modify readme to match new build instructions
1 parent 7a3f1d2 commit 90e7957

File tree

1 file changed

+32
-11
lines changed

1 file changed

+32
-11
lines changed

README.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,25 +123,33 @@ Note: the PSScriptAnalyzer Chocolatey package is provided and supported by the c
123123
* Building
124124
125125
You can either build using the `Visual Studio` solution `PSScriptAnalyzer.sln` or build using `PowerShell` specifically for your platform as follows:
126-
* Windows PowerShell version 5.0 and greater
126+
* The default build is for PowerShell Core
127127
```powershell
128-
.\buildCoreClr.ps1 -Framework net451 -Configuration Release -Build
128+
.\build.ps1
129+
```
130+
* Windows PowerShell version 5.0
131+
```powershell
132+
.\build.ps1 -Framework full -AnalyzerVersion PSV5 -Configuration Release
129133
```
130134
* Windows PowerShell version 4.0
131135
```powershell
132-
.\buildCoreClr.ps1 -Framework net451 -Configuration PSV4Release -Build
136+
.\build.ps1 -Framework full -AnalyzerVersion PSV4 -Configuration Release
133137
```
134138
* Windows PowerShell version 3.0
135139
```powershell
136-
.\buildCoreClr.ps1 -Framework net451 -Configuration PSV3Release -Build
140+
.\build.ps1 -Framework full -AnalyzerVersion PSV3 -Configuration Release
137141
```
138142
* PowerShell Core
139143
```powershell
140-
.\buildCoreClr.ps1 -Framework netstandard2.0 -Configuration Release -Build
144+
.\buildCoreClr.ps1 -Framework core -Configuration Release -Build
145+
```
146+
* Build documentation
147+
```powershell
148+
.\build.ps1 -Documentation
141149
```
142-
* Build documenatation
150+
* Build all versions (PowerShell v3, v4, v5, and Core) and documentation
143151
```powershell
144-
.\build.ps1 -BuildDocs
152+
.\build.ps1 -All
145153
```
146154
* Import the module
147155
```powershell
@@ -157,12 +165,25 @@ For adding/removing resource strings in the `*.resx` files, it is recommended to
157165
#### Tests
158166
Pester-based ScriptAnalyzer Tests are located in `path/to/PSScriptAnalyzer/Tests` folder.
159167

160-
* Ensure [Pester 4.3.1](https://www.powershellgallery.com/packages/Pester/4.3.1) is installed
161-
* Copy `path/to/PSScriptAnalyzer/out/PSScriptAnalyzer` to a folder in `PSModulePath`
168+
* Ensure [Pester 4.3.1](https://www.powershellgallery.com/packages/Pester/4.3.1) or higher is installed
169+
* Ensure that the documentation has been built (`./build.ps1 -Documentation`)
162170
* In the root folder of your local repository, run:
163171
``` PowerShell
164-
$testScripts = ".\Tests\Engine",".\Tests\Rules",".\Tests\Documentation"
165-
Invoke-Pester -Script $testScripts
172+
./build -Test
173+
```
174+
175+
To retrieve the results of the run, you can use the tools which are part of the build module (`build.psm1`)
176+
177+
```powershell
178+
Import-Module ./build.psm1
179+
Get-TestResults
180+
```
181+
182+
To retrieve only the errors, you can use the following:
183+
184+
```powershell
185+
Import-Module ./build.psm1
186+
Get-TestFailures
166187
```
167188

168189
[Back to ToC](#table-of-contents)

0 commit comments

Comments
 (0)