Skip to content

Commit

Permalink
Fix #2671 on GitHub
Browse files Browse the repository at this point in the history
Closes #2678.

--
Reviewed-on: #2678
PiperOrigin-RevId: 150167309
MOS_MIGRATED_REVID=150167309
  • Loading branch information
Peter Mounce authored and meteorcloudy committed Mar 15, 2017
1 parent 0b74113 commit 9bfcb6e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions scripts/packages/chocolatey/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
*.zip
bazel.nuspec
tools/*.exe
tools/LICENSE
tools/params.json
tools/LICENSE*
tools/params.txt
8 changes: 4 additions & 4 deletions scripts/packages/chocolatey/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ if ($fixPackage -eq $true) {
}
$tvPackageFixVersion = "$($prefix)$((get-date).tostring("yyyyMMdd"))"
}
rm -force -ErrorAction SilentlyContinue ./*.nupkg
rm -force -ErrorAction SilentlyContinue ./bazel.nuspec
rm -force -ErrorAction SilentlyContinue ./tools/LICENSE
rm -force -ErrorAction SilentlyContinue ./tools/*.orig
rm -force -ErrorAction SilentlyContinue "./*.nupkg"
rm -force -ErrorAction SilentlyContinue "./bazel.nuspec"
rm -force -ErrorAction SilentlyContinue "./tools/LICENSE*"
rm -force -ErrorAction SilentlyContinue "./tools/*.orig"
rm -force -ErrorAction SilentlyContinue "./tools/params.*"
if ($checksum -eq "") {
rm -force -ErrorAction SilentlyContinue ./*.zip
Expand Down
12 changes: 7 additions & 5 deletions scripts/packages/chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ $packageName = 'bazel'

$toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition
$paramsText = get-content "$($toolsDir)\params.txt"
$p = $paramsText.Split("`n")
write-host "Content of $($toolsDir)\params.txt:"
write-host $paramsText
write-host "url: $($paramsText[0])"
write-host "hash: $($paramsText[1])"
write-host "Type: $($paramsText.GetType())"

$packageDir = Split-Path -parent $toolsDir

write-host "Read params from text file"
write-host $p

Install-ChocolateyZipPackage -PackageName "$packageName" `
-Url64bit "$($p[0])" `
-Checksum64 "$($p[1])" `
-Url64bit "$($paramsText[0])" `
-Checksum64 "$($paramsText[1])" `
-Checksum64Type "sha256" `
-UnzipLocation "$packageDir"

Expand Down

0 comments on commit 9bfcb6e

Please sign in to comment.