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
if ($PSCmdlet.ShouldProcess("ALZ-Terraform module configuration","modify")) {
29
27
30
28
Write-InformationColored"Downloading alz-terraform-accelerator Terraform module to $alzEnvironmentDestination"-ForegroundColor Green -InformationAction Continue
@@ -36,7 +34,7 @@ function New-ALZEnvironmentTerraform {
36
34
}
37
35
38
36
# Downloading the latest or specified version of the alz-terraform-accelerator module
Copy file name to clipboardExpand all lines: src/ALZ/Public/Get-ALZGithubRelease.ps1
+42-3Lines changed: 42 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,28 @@ Checks for the releases of a GitHub repository and downloads the latest release
22
22
functionGet-ALZGithubRelease {
23
23
[CmdletBinding()]
24
24
param (
25
-
[Parameter(Mandatory=$true,Position=1,HelpMessage="Please the provide the full URL of the GitHub repository you wish to check for the latest release.")]
25
+
[Parameter(Mandatory=$true,Position=0,HelpMessage="The IaC provider to use for the ALZ environment.")]
26
+
[ValidateSet("bicep","terraform")]
27
+
[Alias("Iac")]
28
+
[Alias("i")]
26
29
[string]
27
-
$githubRepoUrl,
30
+
$alzIacProvider,
31
+
32
+
[Parameter(Mandatory=$false,Position=1,HelpMessage="Please the provide the full URL of the GitHub repository you wish to check for the latest release.")]
33
+
[string]
34
+
$githubRepoUrl="",
28
35
29
36
[Parameter(Mandatory=$false,Position=2,HelpMessage="The releases to download. Specify 'all' to download all releases or 'latest' to download the latest release. Defaults to the latest release.")]
30
37
[array]
38
+
[Alias("version")]
39
+
[Alias("v")]
31
40
$release="latest",
32
41
33
42
[Parameter(Mandatory=$false,Position=3,HelpMessage="The directory to download the releases to. Defaults to the current directory.")]
34
43
[string]
44
+
[Alias("Output")]
45
+
[Alias("OutputDirectory")]
46
+
[Alias("O")]
35
47
$directoryForReleases="$PWD/releases",
36
48
37
49
[Parameter(Mandatory=$false,Position=4,HelpMessage="An array of strings contianing the paths to the directories or files that you wish to keep when downloading and extracting from the releases.")]
@@ -43,6 +55,23 @@ function Get-ALZGithubRelease {
Write-InformationColored"The release directory for this version already exists and has content in it, so we are not over-writing it."-ForegroundColor Yellow -InformationAction Continue
120
150
Write-Verbose"===> Content already exists in $releaseDirectory. Skipping"
121
151
}
122
152
153
+
# Check and replace the .env file release version if it is Bicep
0 commit comments