@@ -17,25 +17,35 @@ param (
17
17
18
18
$ErrorActionPreference = ' Stop'
19
19
20
+ # start bootstrapping when switch is set
20
21
if ($Bootstrap.IsPresent ) {
21
22
$null = Get-PackageProvider - Name Nuget - ForceBootstrap
23
+ # add PSGallery as repository to install packages
22
24
Set-PSRepository - Name PSGallery - InstallationPolicy Trusted
25
+ # test if PSDepend is not available...
23
26
if (! (Get-Module - Name PSDepend - ListAvailable)) {
27
+ # and install PSDepend as it will handle all other installations
24
28
Install-Module - Name PSDepend - Scope CurrentUser - Repository PSGallery
25
29
}
30
+ # import PSDepend separately after installing
26
31
Import-Module - Name PSDepend - Verbose:$false
32
+ # install all other dependencies by PSDepend
27
33
Invoke-PSDepend - Path ' .\build\dependencies.psd1' - Install - Import - Force - Recurse:$true - WarningAction SilentlyContinue
34
+ # and then install as we do not do anything else
28
35
exit 0
29
36
}
30
37
31
- # run psake itself
38
+ # run psake for building itself
32
39
33
40
# setup build environment with BuildHelpers and manual variables
34
41
Write-Verbose " Invoke BuildHelpers"
42
+ # get buildhelper environment
35
43
Set-BuildEnvironment - Force
36
44
45
+ # set build dir from buildhelpers project path (base) + build
37
46
$buildDir = Join-Path - Path $env: BHProjectPath - ChildPath ' build'
38
47
Write-Verbose " Using `$ buildDir: $buildDir "
48
+ # set build task dir from buildhelpers project path (base) + tasks
39
49
$buildTasksDir = Join-Path - Path $buildDir - ChildPath ' tasks'
40
50
Write-Verbose " Using `$ buildTasksDir: $buildTasksDir "
41
51
@@ -51,7 +61,7 @@ Write-Verbose "Using `$psakeProperties: $psakePropertiesFile"
51
61
$taskFiles = (Get-Item - Path (Join-Path - Path $buildTasksDir - ChildPath ' *.ps1' ))
52
62
Write-Verbose " Found `$ taskFiles: $taskFiles "
53
63
54
- # assemling properties array to be passed to psake
64
+ # assemling properties array to be passed to psake from all variables before
55
65
$psakeParameters = @ {
56
66
" buildDir" = $buildDir ;
57
67
" buildTasksDir" = $buildTasksDir ;
0 commit comments