Merge pull request #4877 from inspec/zenspider/hab

Fixing habitat
This commit is contained in:
Ryan Davis 2020-01-30 17:21:24 -08:00 committed by GitHub
commit bdcff44eb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 11 deletions

View file

@ -171,3 +171,4 @@ subscriptions:
- inspec/owners
- inspec/inspec-core-team
- trigger_pipeline:coverage
- trigger_pipeline:artifact/habitat

View file

@ -63,11 +63,10 @@ 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"
}
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
}

View file

@ -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