Skip to content

Commit 5a04718

Browse files
author
Kapil Borle
committed
Fix releaseBuild and default tasks
1 parent 8b4b8ea commit 5a04718

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.build.ps1

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ param(
66
[string]$Configuration = "Debug"
77
)
88

9+
# todo remove aliases
10+
# todo make each project have its own build script
11+
912
$resourceScript = Join-Path $BuildRoot "New-StronglyTypedCsFileForResx.ps1"
1013
$outPath = "$BuildRoot/out"
1114
$modulePath = "$outPath/PSScriptAnalyzer"
@@ -60,7 +63,6 @@ function Get-BuildTaskParams($project) {
6063
$d = $($Task.Data)
6164
foreach ($frmwrk in $d.Frameworks.Keys) {
6265
foreach ($config in $d.Frameworks[$frmwrk].Configuration) {
63-
Write-Verbose -message "$config $framework" -Verbose:$true
6466
dotnet build --framework $frmwrk --configuration $config
6567
}
6668
}
@@ -163,7 +165,7 @@ task createModule {
163165
$destinationDirBinaries = $destinationDir
164166

165167
foreach ($Framework in $buildData.Frameworks.Keys) {
166-
foreach ($Configuration in $buildData.Frameworks[$Framework]) {
168+
foreach ($Configuration in $buildData.Frameworks[$Framework].Configuration) {
167169
$itemsToCopyBinaries = @("$solutionDir\Engine\bin\$Configuration\$Framework\Microsoft.Windows.PowerShell.ScriptAnalyzer.dll",
168170
"$solutionDir\Rules\bin\$Configuration\$Framework\Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.dll")
169171

@@ -226,9 +228,9 @@ task cleanDocs -if (Test-Path $outputDocsPath) {
226228
}
227229

228230
task newSession {
229-
Start-Process "powershell" -ArgumentList @('-noexit', '-command "import-module c:\users\kabawany\source\repos\psscriptanalyzer\out\psscriptanalyzer"')
231+
Start-Process "powershell" -ArgumentList @('-noexit', "-command import-module $BuildRoot\out\psscriptanalyzer -verbose")
230232
}
231233

232234
# TODO fix building psv3
233235
task release cleanModule, clean, build, createModule, buildDocs
234-
task . build, newSession
236+
task . build, createModule, newSession

0 commit comments

Comments
 (0)