mirror of
https://github.com/inspec/inspec
synced 2025-02-27 21:07:32 +00:00
Merge pull request #5718 from collinmcneese/cm/hab_artifact_tests
Updates habitat test for windows to match install logic for linux
This commit is contained in:
commit
03476d70b8
1 changed files with 9 additions and 6 deletions
|
@ -15,11 +15,14 @@ $Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture'
|
||||||
Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize
|
Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize
|
||||||
|
|
||||||
Write-Host "--- Installing the version of Habitat required"
|
Write-Host "--- Installing the version of Habitat required"
|
||||||
$hab_version = (hab --version)
|
try {
|
||||||
$hab_minor_version = $hab_version.split('.')[1]
|
hab --version
|
||||||
if ( -not $? -Or $hab_minor_version -lt 85 ) {
|
}
|
||||||
Install-Habitat --version 0.85.0.20190916
|
catch {
|
||||||
} else {
|
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||||
|
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.ps1'))
|
||||||
|
}
|
||||||
|
finally {
|
||||||
Write-Host ":habicat: I think I have the version I need to build."
|
Write-Host ":habicat: I think I have the version I need to build."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue