mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
copy paste plan.sh -> plan.ps1 and change for Powershell
Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
parent
5e699d2fb3
commit
01bea50c43
1 changed files with 56 additions and 0 deletions
56
habitat/plan.ps1
Normal file
56
habitat/plan.ps1
Normal file
|
@ -0,0 +1,56 @@
|
|||
$pkg_name="inspec"
|
||||
$pkg_origin="chef"
|
||||
$pkg_version=$(cat "$PLAN_CONTEXT/../VERSION")
|
||||
$pkg_description="InSpec is an open-source testing framework for infrastructure
|
||||
with a human- and machine-readable language for specifying compliance,
|
||||
security and policy requirements."
|
||||
$pkg_upstream_url="https://www.inspec.io/"
|
||||
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
|
||||
$pkg_license=('Apache-2.0')
|
||||
$pkg_deps=@(
|
||||
"core/coreutils",
|
||||
"core/cacerts",
|
||||
"core/git",
|
||||
"core/ruby",
|
||||
"core/bash"
|
||||
)
|
||||
$pkg_build_deps=@(
|
||||
"core/gcc",
|
||||
"core/make",
|
||||
"core/readline",
|
||||
"core/sed"
|
||||
)
|
||||
$pkg_bin_dirs=@("bin")
|
||||
|
||||
do_setup_environment() {
|
||||
build_line 'Setting GEM_HOME="$pkg_prefix/lib"'
|
||||
export GEM_HOME="$pkg_prefix/lib"
|
||||
|
||||
build_line "Setting GEM_PATH=$GEM_HOME"
|
||||
export GEM_PATH="$GEM_HOME"
|
||||
}
|
||||
|
||||
function Invoke-Unpack {
|
||||
mkdir "$HAB_CACHE_SRC_PATH/$pkg_dirname"
|
||||
Copy-Item "$PLAN_CONTEXT"/.. "$HAB_CACHE_SRC_PATH/$pkg_dirname/" -Recurse
|
||||
}
|
||||
|
||||
function Invoke-Build {
|
||||
Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname/"
|
||||
gem build inspec.gemspec
|
||||
Pop-Location
|
||||
Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname/inspec-bin"
|
||||
gem build inspec-bin.gemspec
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
function Invoke-Install {
|
||||
# MUST install inspec first because inspec-bin depends on it via gemspec
|
||||
Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname/"
|
||||
gem install inspec-*.gem --no-document
|
||||
Pop-Location
|
||||
|
||||
Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname/inspec-bin"
|
||||
gem install inspec-bin*.gem --no-document
|
||||
Pop-Location
|
||||
}
|
Loading…
Reference in a new issue