-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateNovaModuleVersion.ps1
More file actions
26 lines (22 loc) · 1.12 KB
/
Copy pathUpdateNovaModuleVersion.ps1
File metadata and controls
26 lines (22 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function Update-NovaModuleVersion {
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[string]$Path = (Get-Location).Path,
[switch]$Preview,
[switch]$ContinuousIntegration,
[switch]$OverrideWarning
)
$projectRoot = (Resolve-Path -LiteralPath $Path).Path
$ciActivation = Invoke-NovaVersionUpdateCiActivation -ProjectRoot $projectRoot -Parameters $PSBoundParameters -ContinuousIntegration:$ContinuousIntegration -WhatIfEnabled:$WhatIfPreference
if ($ciActivation.ShouldReturn) {
return $ciActivation.Result
}
$workflowContext = Get-NovaVersionUpdateWorkflowContext -ProjectRoot $projectRoot -PreviewRelease:$Preview -ContinuousIntegrationRequested:$ContinuousIntegration -OverrideWarningRequested:$OverrideWarning
$shouldRun = $PSCmdlet.ShouldProcess($workflowContext.Target, $workflowContext.Action)
$result = Invoke-NovaVersionUpdateWorkflow -WorkflowContext $workflowContext -ShouldRun:$shouldRun -WhatIfEnabled:$WhatIfPreference
if ($null -eq $result) {
return
}
Write-NovaVersionUpdateResultOutput -Result $result
return $result
}