summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2019-10-30 20:59:37 -0400
committerRobb Kidd <robb@thekidds.org>2019-11-01 14:22:33 -0400
commita5135ad9ac60c6f1620f92cb6bd1321641c14dbc (patch)
tree316088bdfa43956fccc32b46e9c96c4011ca4050
parentf379e6dab2db0f507b636d0dcf09af81cd1ac4d4 (diff)
downloadchef-habiwindochef.tar.gz
only install hab 0.85 if not already installedhabiwindochef
Signed-off-by: Robb Kidd <robb@thekidds.org>
-rw-r--r--scripts/ci/verify-plan.ps113
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/ci/verify-plan.ps1 b/scripts/ci/verify-plan.ps1
index de711cf542..880e5a3262 100644
--- a/scripts/ci/verify-plan.ps1
+++ b/scripts/ci/verify-plan.ps1
@@ -12,8 +12,15 @@ $Plan = 'chef-infra-client'
Write-Host "--- :8ball: :windows: Verifying $Plan"
-Write-Host "--- :habicat: Installing the version of Habitat required"
-Install-Habitat --version 0.85.0.20190916
+$hab_version = (hab --version)
+$hab_minor_version = $hab_version.split('.')[1]
+if ( -not $? -Or $hab_minor_version -lt 85 ) {
+ Write-Host "--- :habicat: Installing the version of Habitat required"
+ install-habitat --version 0.85.0.20190916
+} else {
+ Write-Host "--- :habicat: :thumbsup: Minimum required version of Habitat already installed"
+}
+
Write-Host "--- :key: Generating fake origin key"
hab origin key generate $env:HAB_ORIGIN
@@ -34,4 +41,4 @@ hab pkg install results/$pkg_artifact
if (-not $?) { throw "unable to install this build"}
Write-Host "--- :mag_right: Testing $Plan"
-powershell -File "./habitat/tests/test.ps1" -PackageIdentifier $pkg_ident \ No newline at end of file
+powershell -File "./habitat/tests/test.ps1" -PackageIdentifier $pkg_ident