Skip to content

Commit f3f8d47

Browse files
committed
Updated publish-release to function in strict-mode
1 parent de25531 commit f3f8d47

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

OneFlow/Publish-Release.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ $buildInfo = Initialize-BuildEnvironment
55
[xml]$buildVersionXml = Get-Content .\BuildVersion.xml
66
$buildVersionData = $buildVersionXml.BuildVersionData
77
$preReleaseSuffix=""
8-
if(![string]::IsNullOrWhiteSpace($buildVersionData.PreReleaseName))
8+
if($buildVersionData.PSObject.Properties['PreReleaseName'])
99
{
1010
$preReleaseSuffix = "-$($buildVersionData.PreReleaseName)"
11-
if(![string]::IsNullOrWhiteSpace($buildVersionData.PreReleaseNumber))
11+
if($buildVersionData.PSObject.Properties['PreReleaseNumber'])
1212
{
1313
$preReleaseSuffix += ".$($buildVersionData.PreReleaseNumber)"
14-
if(![string]::IsNullOrWhiteSpace($buildVersionData.PreReleaseFix))
14+
if($buildVersionData.PSObject.Properties['PreReleaseFix'])
1515
{
1616
$preReleaseSuffix += ".$($buildVersionData.PreReleaseFix)"
1717
}
@@ -46,6 +46,8 @@ if( $localCommitSha -ne $remoteCommitSha )
4646
throw "Local HEAD is not the same as origin, these must be in sync so that only the tag itself is pushed"
4747
}
4848

49+
Write-Information "tagging $tagname on $releasebranch"
50+
4951
git tag -a $tagname -m "Official release: $tagname"
5052
git checkout develop
5153
git merge $releaseBranch

0 commit comments

Comments
 (0)