Skip to content

Commit 71dce84

Browse files
committed
added inline comments
1 parent 60a7090 commit 71dce84

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

build.ps1

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,35 @@ param (
1717

1818
$ErrorActionPreference = 'Stop'
1919

20+
# start bootstrapping when switch is set
2021
if ($Bootstrap.IsPresent) {
2122
$null = Get-PackageProvider -Name Nuget -ForceBootstrap
23+
# add PSGallery as repository to install packages
2224
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
25+
# test if PSDepend is not available...
2326
if (!(Get-Module -Name PSDepend -ListAvailable)) {
27+
# and install PSDepend as it will handle all other installations
2428
Install-Module -Name PSDepend -Scope CurrentUser -Repository PSGallery
2529
}
30+
# import PSDepend separately after installing
2631
Import-Module -Name PSDepend -Verbose:$false
32+
# install all other dependencies by PSDepend
2733
Invoke-PSDepend -Path '.\build\dependencies.psd1' -Install -Import -Force -Recurse:$true -WarningAction SilentlyContinue
34+
# and then install as we do not do anything else
2835
exit 0
2936
}
3037

31-
# run psake itself
38+
# run psake for building itself
3239

3340
# setup build environment with BuildHelpers and manual variables
3441
Write-Verbose "Invoke BuildHelpers"
42+
# get buildhelper environment
3543
Set-BuildEnvironment -Force
3644

45+
# set build dir from buildhelpers project path (base) + build
3746
$buildDir = Join-Path -Path $env:BHProjectPath -ChildPath 'build'
3847
Write-Verbose "Using `$buildDir: $buildDir"
48+
# set build task dir from buildhelpers project path (base) + tasks
3949
$buildTasksDir = Join-Path -Path $buildDir -ChildPath 'tasks'
4050
Write-Verbose "Using `$buildTasksDir: $buildTasksDir"
4151

@@ -51,7 +61,7 @@ Write-Verbose "Using `$psakeProperties: $psakePropertiesFile"
5161
$taskFiles = (Get-Item -Path (Join-Path -Path $buildTasksDir -ChildPath '*.ps1'))
5262
Write-Verbose "Found `$taskFiles: $taskFiles"
5363

54-
# assemling properties array to be passed to psake
64+
# assemling properties array to be passed to psake from all variables before
5565
$psakeParameters = @{
5666
"buildDir" = $buildDir;
5767
"buildTasksDir" = $buildTasksDir;

0 commit comments

Comments
 (0)