Skip to content

Commit

Permalink
tools deploy bugfix -Pretend for vcpkg ports
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Aug 14, 2024
1 parent f06e18d commit 2694b9c
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tools/deploy.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env pwsh

Param(
[Parameter(HelpMessage = 'Specifies whether to skip git push (semi pretend or dry run).')]
[switch] $WithoutPush
[Parameter(
HelpMessage = 'Specifies whether to skip git push and updating vcpkg ports ' +
'(semi pretend or dry run).')]
[switch] $Pretend
)

Set-StrictMode -Version 3.0
Expand Down Expand Up @@ -1525,7 +1527,7 @@ function Invoke-MergeDevelopAndDeploy {
Test-WorkingTreeClean

# Allow to skip push-es (for testing)
if (-not $WithoutPush) {
if (-not $Pretend) {
NewLine
Write-Progress 'Pushing to origin/develop branch...'
git push --progress origin refs/heads/develop:refs/heads/develop
Expand All @@ -1543,7 +1545,7 @@ function Invoke-MergeDevelopAndDeploy {
Test-LastExitCode

# Allow to skip push-es (for testing)
if (-not $WithoutPush) {
if (-not $Pretend) {
NewLine
Write-Progress 'Pushing to origin/main branch...'
$followTagsArg = $FollowTags ? '--follow-tags' : $null
Expand Down Expand Up @@ -1685,7 +1687,13 @@ function Invoke-UpdateVcpkgPorts {
Param()

# Don't allow to skip updating the vcpkg ports because they must be always updated if merging
# into the main branch
# into the main branch (of course excluding the Pretend).

# This feature cannot be completed without a git push, so the entire function must be skipped
# in Pretend mode.
if ($Pretend) {
return
}

Write-Header 'Updating vcpkg ports REF and SHA512'

Expand Down

0 comments on commit 2694b9c

Please sign in to comment.