You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enhancement: support separate starter module upgrade (#110)
# Pull Request
## Description
This change improves the upgrade process to be able to auto upgrade the
bootstrap and starter modules independently.
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
Write-InformationColored"AUTOMATIC UPGRADE: Upgrade complete. If any starter files have been updated, you will need to remove branch protection in order for the Terraform apply to succeed."-ForegroundColor Yellow -InformationAction Continue
67
+
if($starterWasUpgraded-or$bootstrapWasUpgraded) {
68
+
Write-InformationColored"AUTOMATIC UPGRADE: Upgrade complete. If any starter files have been updated, you will need to remove branch protection in order for the Terraform apply to succeed."-NewLineBefore -ForegroundColor Yellow -InformationAction Continue
Copy file name to clipboardExpand all lines: src/ALZ/Private/Deploy-Accelerator-Helpers/Invoke-Upgrade.ps1
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
functionInvoke-Upgrade {
2
2
[CmdletBinding(SupportsShouldProcess=$true)]
3
3
param (
4
+
[Parameter(Mandatory=$false)]
5
+
[string] $moduleType,
6
+
4
7
[Parameter(Mandatory=$false)]
5
8
[string] $targetDirectory,
6
9
@@ -54,7 +57,7 @@ function Invoke-Upgrade {
54
57
if($autoApprove) {
55
58
$upgrade="upgrade"
56
59
} else {
57
-
Write-InformationColored"AUTOMATIC UPGRADE: We found version $previousVersion that has been previously run. You can upgrade from this version to the new version $currentVersion"-ForegroundColor Yellow -InformationAction Continue
60
+
Write-InformationColored"AUTOMATIC UPGRADE: We found version $previousVersionof the $moduleType module that has been previously run. You can upgrade from this version to the new version $currentVersion"-NewLineBefore-ForegroundColor Yellow -InformationAction Continue
58
61
$upgrade=Read-Host"If you would like to upgrade, enter 'upgrade' or just hit 'enter' to continue with a new environment. (upgrade/exit)"
0 commit comments