Skip to content

Commit

Permalink
Add test mode to PublishRelease.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthysell committed Jun 15, 2022
1 parent 3c3a9be commit 33e6982
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/PublishRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ param(
[string]$BumpPart = "patch",
[string]$DirectoryBuildPropsFile = "src\Directory.Build.props",
[string]$AppxManifestFile = "src\Mzinga.Viewer.WinStore\Package.appxmanifest",
[string]$ChangelogFile = ".\CHANGELOG.md"
[string]$ChangelogFile = ".\CHANGELOG.md",
[boolean]$Test = $False
)

# Adapted from https://gist.github.com/derantell/b8a4c87ea50177b900379df92a25de9d
Expand Down Expand Up @@ -59,11 +60,13 @@ try
Write-Host "Tagging release commit..."
&git tag v$NewVersion

Write-Host "Pushing release commit..."
&git push
if (!$Test) {
Write-Host "Pushing release commit..."
&git push

Write-Host "Pushing tags..."
&git push --tags
Write-Host "Pushing tags..."
&git push --tags
}
}
finally
{
Expand Down

0 comments on commit 33e6982

Please sign in to comment.