Building PoshBot

May 18, 2017 ยท View on GitHub

The PoshBot repository has various tasks defined in psake. These tasks can be executed via the build.ps1 script and passing in the task name you wish to execute.

Tasks

Task nameDescription
AnalyzeRun PSScriptAnalyzer rules
PesterRun Pester tests
TestRun both the Analyze and Pester tasks
BuildCompile PS source files

Analyze

Run PSScriptAnalyzer rules on the module.

This task will first compile the source files into the complete module under the out folder in the root of the repository and then run Script Analyzer rules against it.

.\build.ps1 -Task Analyze

Pester

Run Pester tests against the module.

This task will first compile the source files into the complete module under the out folder in the root of the repository and then run a set of Pester tests to validate functionality.

.\build.ps1 -Task Pester

Test

Run both the Analyze and Pester tasks

.\build.ps1 -Task Test

Build

Build the source files into a usable module. The files under the PoshBot subfolder will not run as a PowerShell module by itself. The module must be built first. This task will produce a usable module in a folder called out in the root of the repository.

.\build.ps1 -Task Build