From beda81552420e3624a416568f73f9514aefc5f5e Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 30 Jan 2020 15:58:27 -0800 Subject: [PATCH 1/3] I *think* this will fix habitat. Signed-off-by: Ryan Davis --- habitat/plan.ps1 | 2 +- habitat/plan.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index 465a35d4b..df08ea9b8 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -63,7 +63,7 @@ function Invoke-Install { try { Push-Location $pkg_prefix bundle config --local gemfile $project_root/Gemfile - foreach($gem in ("inspec-bin", "inspec")) { + foreach($gem in ("inspec-bin", "inspec-core", "inspec")) { Write-BuildLine "** generating binstubs for $gem with precise version pins" Invoke-Expression -Command "appbundler.bat $project_root $pkg_prefix/bin $gem" } diff --git a/habitat/plan.sh b/habitat/plan.sh index 5abea41b4..a1523eba7 100644 --- a/habitat/plan.sh +++ b/habitat/plan.sh @@ -37,6 +37,7 @@ do_unpack() { do_build() { pushd "$HAB_CACHE_SRC_PATH/$pkg_dirname/" gem build inspec.gemspec + gem build inspec-core.gemspec popd pushd "$HAB_CACHE_SRC_PATH/$pkg_dirname/inspec-bin" gem build inspec-bin.gemspec From cf286daa433480bc38a0f6555df6dd8e142b8f32 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 30 Jan 2020 16:53:10 -0800 Subject: [PATCH 2/3] While we're in here... let's trigger artifact/habitat on PRs Signed-off-by: Ryan Davis --- .expeditor/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index c7818f201..be1395f31 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -171,3 +171,4 @@ subscriptions: - inspec/owners - inspec/inspec-core-team - trigger_pipeline:coverage + - trigger_pipeline:artifact/habitat From 87b39d1f7fdbd1e9f2e0639394d72d9a7c8ecb20 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Thu, 30 Jan 2020 17:04:48 -0800 Subject: [PATCH 3/3] Removed Remove-StudioPathFrom from habitat/plan.ps1. We don't have backslashes in our Gemfile so I'm not sure what it was doing in the first place... AND, apparently the file wasn't there. Signed-off-by: Ryan Davis --- habitat/plan.ps1 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/habitat/plan.ps1 b/habitat/plan.ps1 index df08ea9b8..ffae72261 100644 --- a/habitat/plan.ps1 +++ b/habitat/plan.ps1 @@ -67,7 +67,6 @@ function Invoke-Install { Write-BuildLine "** generating binstubs for $gem with precise version pins" Invoke-Expression -Command "appbundler.bat $project_root $pkg_prefix/bin $gem" } - Remove-StudioPathFrom -File $pkg_prefix/vendor/gems/inspec-$pkg_version*/Gemfile } finally { Pop-Location # forget about the build bundle config @@ -89,12 +88,3 @@ function Invoke-After { Get-ChildItem $pkg_prefix/vendor/gems -Include @("gem_make.out", "mkmf.log", "Makefile") -File -Recurse ` | Remove-Item -Force } - -function Remove-StudioPathFrom { - Param( - [Parameter(Mandatory=$true)] - [String] - $File - ) - (Get-Content $File) -replace ($env:FS_ROOT -replace "\\","/"),"" | Set-Content $File -}