ScoopInstaller_Main/pester.json
2017-09-15 19:01:50 +00:00

38 lines
1.4 KiB
JSON

{
"version": "4.0.8",
"license": "https://raw.githubusercontent.com/pester/Pester/master/LICENSE",
"url": "https://github.com/pester/pester/archive/4.0.8.tar.gz",
"homepage": "https://github.com/pester/Pester",
"hash": "dfb6c467de847b3a49b99911a7af408fb33afb008871feca90811a712941a935",
"extract_dir": "pester-4.0.8",
"bin": "bin\\pester.bat",
"post_install": "
$import = \"try { `$null = gcm pester -ea stop; import-module `\"$dir\\pester.psm1`\" } catch { }\"
if($profile) {
'adding pester to powershell profile...'
if(!(test-path $profile)) {
'powershell profile doesn''t exist. creating...'
$profile_dir = split-path $profile
if(!(test-path $profile_dir)) { mkdir $profile_dir > $null }
'' > $profile
}
$text = get-content $profile
if (($text | sls 'pester') -eq $null) {
$new_profile = @($text) + $import
$new_profile > $profile
success 'pester added to powershell profile.'
}
} else { warn 'no powershell profile found. the pester module will not be imported each session.' }
'importing pester for current session...'
iex \"$import\"
",
"checkver": "github",
"autoupdate": {
"url": "https://github.com/pester/pester/archive/$version.tar.gz",
"extract_dir": "pester-$version"
}
}