aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/packages/chocolatey
diff options
context:
space:
mode:
authorGravatar Peter Mounce <petermounce@improbable.io>2017-04-12 07:06:52 +0000
committerGravatar Jakob Buchgraber <buchgr@google.com>2017-04-12 11:49:13 +0200
commit0b18c5dcf807c6062018f9595dcb054bc35492fc (patch)
tree649aaa576cd2a8fa63c4cf21b2c0c59724cb49cd /scripts/packages/chocolatey
parent8d876cf3ac18a0563828f4d66a48b84c957c55fb (diff)
Squash remaining unmerged changes and resubmit PR from #2758
Closes #2764. PiperOrigin-RevId: 152907840
Diffstat (limited to 'scripts/packages/chocolatey')
-rw-r--r--scripts/packages/chocolatey/test.ps17
-rw-r--r--scripts/packages/chocolatey/tools/chocolateyinstall.ps18
2 files changed, 8 insertions, 7 deletions
diff --git a/scripts/packages/chocolatey/test.ps1 b/scripts/packages/chocolatey/test.ps1
index b561ba2a98..a2349351cd 100644
--- a/scripts/packages/chocolatey/test.ps1
+++ b/scripts/packages/chocolatey/test.ps1
@@ -1,13 +1,14 @@
param(
[switch] $prerelease,
- [string] $sources = "."
+ [string] $sources = ".",
+ [string] $version = "0.4.5.20170330"
)
choco uninstall bazel --force -y
if ($prerelease) {
- choco install bazel --verbose --debug --prerelease --force -y -s $sources
+ choco install ".\bazel.$($version).nupkg" --verbose --debug --prerelease --force -y -s $sources
} else {
- choco install bazel --verbose --debug --force -y -s $sources
+ choco install ".\bazel.$($version).nupkg" --verbose --debug --force -y -s $sources
}
if ($LASTEXITCODE -ne 0)
diff --git a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
index 32d4c709b9..84cd295bd3 100644
--- a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
+++ b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
@@ -15,20 +15,20 @@ $packageDir = Split-Path -parent $toolsDir
Install-ChocolateyZipPackage -PackageName "$packageName" `
-Url64bit "$($paramsText[0])" `
-Checksum64 "$($paramsText[1])" `
- -Checksum64Type "sha256" `
- -ChecksumType "sha256" `
+ -ChecksumType64 "sha256" `
-UnzipLocation "$packageDir"
write-host "Ensure that msys2 dll is present in PATH to allow bazel to be run from non-msys2 shells"
$pp = Get-PackageParameters $env:chocolateyPackageParameters
-Install-ChocolateyPath -PathToInstall "$($pp.msys2Path)\usr\bin" -PathType "Machine"
+$msys2Path = ($pp.msys2Path, "c:\tools\msys64" -ne $null)[0]
+Install-ChocolateyPath -PathToInstall "$($msys2Path)\usr\bin" -PathType "Machine"
$addToMsysPath = ($packageDir -replace '^([a-zA-Z]):\\(.*)','/$1/$2') -replace '\\','/'
write-host @"
bazel installed to $packageDir
To use it in powershell or cmd, you should ensure your PATH environment variable contains
- $($pp.msys2Path)\usr\bin
+ $($msys2Path)\usr\bin
BEFORE both
c:\windows\system32 (because bash-on-windows' bash.exe will be found here, if it's installed)
any references to msysgit (like c:\program files (x86)\git\bin or c:\program files (x86)\git\cmd) (because git's vendored version of msys2 will interfere with the real msys2)