aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/packages
diff options
context:
space:
mode:
authorGravatar Peter Mounce <petermounce@improbable.io>2017-05-29 14:43:53 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-05-29 16:42:35 +0200
commit65ff1543c161014e0bbcf20cec189a0a76888c2d (patch)
treec1a837c8997f6d11736202c69e9ebb0e298a5260 /scripts/packages
parent86445d41f0636c3cfc375dd5e72171f6cbf4da81 (diff)
Make msysless flavour be the default inside chocolatey
This attempts to fix #3006. This change will presumably have to be reversed once msysless binary name changes to become the default. It would be simpler to name the default binary for being default, to avoid special casing (see https://github.com/bazelbuild/bazel/issues/3006#issuecomment-301440068). Closes #3066. PiperOrigin-RevId: 157390473
Diffstat (limited to 'scripts/packages')
-rw-r--r--scripts/packages/chocolatey/bazel.nuspec.template1
-rw-r--r--scripts/packages/chocolatey/build.ps14
-rw-r--r--scripts/packages/chocolatey/tools/chocolateyinstall.ps123
-rw-r--r--scripts/packages/chocolatey/tools/chocolateyuninstall.ps110
4 files changed, 5 insertions, 33 deletions
diff --git a/scripts/packages/chocolatey/bazel.nuspec.template b/scripts/packages/chocolatey/bazel.nuspec.template
index bf787eb075..761d43f0e5 100644
--- a/scripts/packages/chocolatey/bazel.nuspec.template
+++ b/scripts/packages/chocolatey/bazel.nuspec.template
@@ -76,7 +76,6 @@ Supply like `--params="/option:'value' ..."` ([see docs for --params](https://gi
</dependencies>-->
<dependencies>
<dependency id="chocolatey-core.extension" version="1.0.7"/>
- <dependency id="jdk8" version="[8.0.102,)"/>
<dependency id="msys2" version="[20160719.1.0,20160719.1.1]"/>
<dependency id="python2" version="[2.7.11,3.0)"/>
</dependencies>
diff --git a/scripts/packages/chocolatey/build.ps1 b/scripts/packages/chocolatey/build.ps1
index 3d479ad655..9ddcd76626 100644
--- a/scripts/packages/chocolatey/build.ps1
+++ b/scripts/packages/chocolatey/build.ps1
@@ -9,12 +9,12 @@ param(
write-host "mode: $mode"
if ($mode -eq "release") {
$tvVersion = $version
- $tvFilename = "bazel-$($tvVersion)-windows-x86_64.zip"
+ $tvFilename = "bazel-msvc-$($tvVersion)-windows-msvc-x86_64.zip"
$tvUri = "https://github.com/bazelbuild/bazel/releases/download/$($tvVersion)/$($tvFilename)"
$tvReleaseNotesUri = "https://github.com/bazelbuild/bazel/releases/tag/$tvVersion"
} elseif ($mode -eq "rc") {
$tvVersion = "$($version)-rc$($rc)"
- $tvFilename = "bazel-$($version)rc$($rc)-windows-x86_64.zip"
+ $tvFilename = "bazel-msvc-$($version)rc$($rc)-windows-msvc-x86_64.zip"
$tvUri = "https://storage.googleapis.com/bazel/$($version)/rc$($rc)/$($tvFilename)"
$tvReleaseNotesUri = "https://storage.googleapis.com/bazel/$($version)/rc$($rc)/index.html"
} elseif ($mode -eq "local") {
diff --git a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1 b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
index 84cd295bd3..6b91e1a3d2 100644
--- a/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
+++ b/scripts/packages/chocolatey/tools/chocolateyinstall.ps1
@@ -11,35 +11,18 @@ write-host "Type: $($paramsText.GetType())"
$packageDir = Split-Path -parent $toolsDir
-
Install-ChocolateyZipPackage -PackageName "$packageName" `
-Url64bit "$($paramsText[0])" `
-Checksum64 "$($paramsText[1])" `
-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
-$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
- $($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)
-
-To use it in msys2, you should add that to your msys2 PATH:
- export PATH=$($addToMsysPath):`$PATH
-
-You also need, in your msys2 environment (adjust paths for your system):
- export JAVA_HOME="`$(ls -d C:/Program\ Files/Java/jdk* | sort | tail -n 1)`"
- export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
- export BAZEL_PYTHON=c:/tools/python2/python.exe
+You also need, in your environment variables (adjust paths for your system):
+ BAZEL_SH=c:\tools\msys64\usr\bin\bash.exe
+ BAZEL_PYTHON=c:\tools\python2\python.exe
See also https://bazel.build/docs/windows.html
"@
diff --git a/scripts/packages/chocolatey/tools/chocolateyuninstall.ps1 b/scripts/packages/chocolatey/tools/chocolateyuninstall.ps1
deleted file mode 100644
index 0b4daa3f7b..0000000000
--- a/scripts/packages/chocolatey/tools/chocolateyuninstall.ps1
+++ /dev/null
@@ -1,10 +0,0 @@
-write-host @"
-bazel is being uninstalled.
-
-You should now:
-* Remove "<msys>/usr/bin" from your PATH
-
-Sorry this isn't automatic; there are no helper functions available within chocolatey (as of v0.10.0) to do these steps as part of the uninstall. See:
-* https://github.com/chocolatey/choco/issues/310
-* https://github.com/chocolatey/package-validator/issues/148
-"@