Skip to content

Commit e504857

Browse files
committed
- Fixed minor bug and added another verbose statement.
1 parent e7b619e commit e504857

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Set-ProjectFilesClickOnceVersion.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ $propertyGroups = Get-XmlNodes -XmlDocument $xml -NodePath 'Project.PropertyGrou
202202
[Array]$clickOncePropertyGroups = $propertyGroups | Where-Object {
203203
try
204204
{
205-
$_.ApplicationVersion -ne $null
206-
return $true
205+
return ($_.ApplicationVersion -ne $null)
207206
}
208207
catch { return $false }
209208
}
@@ -215,8 +214,13 @@ if ($clickOncePropertyGroups -eq $null -or $clickOncePropertyGroups.Count -eq 0)
215214
}
216215

217216
# Iterate over each <PropertyGroup> that has ClickOnce deployment settings and update them.
217+
$numberOfClickOncePropertyGroups = $clickOncePropertyGroups.Length
218+
$numberOfClickOncePropertyGroupsProcessed = 0
218219
foreach ($clickOncePropertyGroup in $clickOncePropertyGroups)
219220
{
221+
$numberOfClickOncePropertyGroupsProcessed++
222+
Write-Verbose "Processing ClickOnce property group $numberOfClickOncePropertyGroupsProcessed of $numberOfClickOncePropertyGroups in file '$ProjectFilePath'."
223+
220224
# If the Version to use was not provided, get it from the project file.
221225
$appVersion = $Version
222226
if ([string]::IsNullOrEmpty($appVersion))

Tests/RunTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Write-Host ("{0}. Use Build Id parameter..." -f ++$testNumber)
4949
$output = RunScriptWithParameters "-BuildSystemsBuildId 1234"
5050
if ($output -eq '1.2.0.1234') { Write-Host "Passed" } else { throw "Test $testNumber failed. Output was '$output'." }
5151

52-
Write-Host ("{0}. Use Build Id parameter greater than the max value to make sure build is set properly. Should also see Verbose statemnt..." -f ++$testNumber)
52+
Write-Host ("{0}. Use Build Id parameter greater than the max value to make sure build is set properly. Should also see Verbose statments..." -f ++$testNumber)
5353
$output = RunScriptWithParameters "-BuildSystemsBuildId 123456 -Verbose"
5454
if ($output -eq '1.2.1.57921') { Write-Host "Passed" } else { throw "Test $testNumber failed. Output was '$output'." }
5555

0 commit comments

Comments
 (0)