Skip to content

Commit

Permalink
[Windows] Adding Bicep CLI (actions#3600)
Browse files Browse the repository at this point in the history
* Add Bicep CLI

* Correct regex for bicep version

Co-authored-by: Marcus Felling <MarcusFelling@microsoft.com>
  • Loading branch information
MarcusFelling and Marcus Felling authored Jun 23, 2021
1 parent d986b25 commit 1a96373
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions images/win/scripts/Installers/Install-Bicep.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
################################################################################
## File: Install-Bicep.ps1
## Desc: Install Bicep
################################################################################

Choco-Install -PackageName Bicep

Invoke-PesterTests -TestFile "Tools" -TestName "Bicep"
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ $markdown += New-MDList -Style Unordered -Lines (@(
(Get-AzCopyVersion),
(Get-BazelVersion),
(Get-BazeliskVersion),
(Get-BicepVersion),
(Get-CabalVersion),
(Get-CMakeVersion),
(Get-CodeQLBundleVersion),
Expand Down
6 changes: 6 additions & 0 deletions images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ function Get-BazeliskVersion {
return "Bazelisk $bazeliskVersion"
}

function Get-BicepVersion {
(bicep --version | Out-String) -match "bicep cli version (?<version>\d+\.\d+\.\d+)" | Out-Null
$bicepVersion = $Matches.Version
return "Bicep $bicepVersion"
}

function Get-RVersion {
($(cmd /c "Rscript --version 2>&1") | Out-String) -match "R scripting front-end version (?<version>\d+\.\d+\.\d+)" | Out-Null
$rVersion = $Matches.Version
Expand Down
6 changes: 6 additions & 0 deletions images/win/scripts/Tests/Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Describe "Bazel" {
}
}

Describe "Bicep" {
It "Bicep" {
"bicep --version" | Should -ReturnZeroExitCode
}
}

Describe "CMake" {
It "cmake" {
"cmake --version" | Should -ReturnZeroExitCode
Expand Down
3 changes: 2 additions & 1 deletion images/win/windows2016.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@
"{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1",
"{{ template_dir }}/scripts/Installers/Install-Apache.ps1",
"{{ template_dir }}/scripts/Installers/Install-Nginx.ps1",
"{{ template_dir }}/scripts/Installers/Install-Swig.ps1"
"{{ template_dir }}/scripts/Installers/Install-Swig.ps1",
"{{ template_dir }}/scripts/Installers/Install-Bicep.ps1"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion images/win/windows2019.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@
"{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1",
"{{ template_dir }}/scripts/Installers/Install-Apache.ps1",
"{{ template_dir }}/scripts/Installers/Install-Nginx.ps1",
"{{ template_dir }}/scripts/Installers/Install-Swig.ps1"
"{{ template_dir }}/scripts/Installers/Install-Swig.ps1",
"{{ template_dir }}/scripts/Installers/Install-Bicep.ps1"
]
},
{
Expand Down

0 comments on commit 1a96373

Please sign in to comment.