build: choco: update chocolatey package as per guidelines from chocolatey admin

This commit is contained in:
Bill Zissimopoulos 2017-12-06 16:24:27 -08:00
parent f3819ba839
commit a2ec40008f
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3
4 changed files with 10 additions and 7 deletions

View File

@ -28,7 +28,7 @@ if ($key.Count -eq 1) {
-File "$file"
}
} elseif ($key.Count -eq 0) {
Write-Warning "$packageName has already been uninstalled by other means."
# Write-Warning "$packageName is not installed"
} elseif ($key.Count -gt 1) {
Write-Warning "Too many matching packages found! Package may not be uninstalled."
Write-Warning "Please alert package maintainer the following packages were matched:"

View File

@ -1,16 +1,14 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$fileLocation = @(Get-ChildItem $toolsDir -filter winfsp-*.msi)[0].FullName
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
. "$toolsdir\chocolateyHelper.ps1"
$packageArgs = @{
packageName = 'winfsp'
fileType = 'msi'
file = $fileLocation
file = @(Get-ChildItem $toolsDir -filter winfsp-*.msi)[0].FullName
silentArgs = "/qn /norestart INSTALLLEVEL=1000"
validExitCodes = @(0, 3010, 1641)
}
Install-ChocolateyInstallPackage @packageArgs
Remove-Item -Force $packageArgs.file

View File

@ -0,0 +1,4 @@
$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
. "$toolsdir\chocolateyHelper.ps1"

View File

@ -50,7 +50,8 @@ To verify installation:
<file src="LICENSE.txt" target="tools" />
<file src="VERIFICATION.txt" target="tools" />
<file src="chocolateyInstall.ps1" target="tools" />
<file src="chocolateyBeforeModify.ps1" target="tools" />
<file src="chocolateyUninstall.ps1" target="tools" />
<file src="chocolateyHelper.ps1" target="tools" />
<file src="winfsp-$version$.msi" target="tools" />
</files>
</package>