Notices: This section not yet converted to new layout. Download stats are rolling back out.

bazel (Install)

0.4.5

Package test results are passing.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved as a trusted package on 3/16/2017.

Build software of any size, quickly and reliably, just as engineers do at Google.

Bazel is Google's own build tool, now publicly available in Beta.

Bazel has built-in support for building both client and server software, including client applications for both Android and iOS platforms. It also provides an extensible framework that you can use to develop your own build rules.

Package parameters

Supply like --params="/option:value ..." (see docs for --params)

  • msys2Path (optional, defaults to c:\tools\msys64) - override this if msys2 is installed elsewhere.

To install bazel (Install), run the following command from the command line or from PowerShell:

C:\> choco install bazel

To upgrade bazel (Install), run the following command from the command line or from PowerShell:

C:\> choco upgrade bazel

Files

Hide
  • tools\chocolateybeforemodify.ps1 Show
    write-host "Attempting to stop any running bazel processes, to allow upgrade"
    try
    {
      $running = get-process bazel
    }
    catch
    {
      write-host "No running bazel processes to stop"
      $running = @()
    }
    
    if ($running)
    {
      write-host "Stopping bazel processes"
      foreach($p in $running)
      {
        stop-process $p
        write-verbose "Stopped $($p.ProcessName) $($p.Id)"
      }
    }
    
  • tools\chocolateyinstall.ps1 Show
    $ErrorActionPreference = 'Stop'; # stop on all errors
    $packageName = 'bazel'
    
    $toolsDir = Split-Path -parent $MyInvocation.MyCommand.Definition
    $paramsText = get-content "$($toolsDir)\params.txt"
    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
    
    
    Install-ChocolateyZipPackage -PackageName "$packageName" `
      -Url64bit "$($paramsText[0])" `
      -Checksum64 "$($paramsText[1])" `
      -Checksum64Type "sha256" `
      -UnzipLocation "$packageDir"
    
    write-host "Ensure that msys2 dll is present in PATH to allow bazel to be run from non-msys2 shells"
    
    # from docs: https://github.com/chocolatey/choco/wiki/How-To-Parse-PackageParameters-Argument
    $msys2Path = "c:\tools\msys64"
    if ($packageParameters)
    {
      $match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
      $option_name = 'option'
      $value_name = 'value'
    
      if ($packageParameters -match $match_pattern)
      {
        $results = $packageParameters | Select-String $match_pattern -AllMatches
        $results.matches | % {
          $arguments.Add(
            $_.Groups[$option_name].Value.Trim(),
            $_.Groups[$value_name].Value.Trim())
        }
      }
      else
      {
        Throw "Package Parameters were found but were invalid (REGEX Failure)"
      }
    
      if ($arguments.ContainsKey("msys2Path")) {
        $msys2Path = $arguments["msys2Path"]
        Write-Host "msys2Path Argument Found: $msys2Path"
      }
    }
    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
    
    See also https://bazel.build/docs/windows.html
    "@
    
    
  • tools\chocolateyuninstall.ps1 Show
    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
    "@
    
  • tools\LICENSE
  • tools\params.txt Show
    https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-windows-x86_64.zip
    a9529c5faf1a9f0be8d8afcf81d5ecfff3c2a61aaf7de8ce07b3a42c9335fec5
    
  • tools\VERIFICATION.txt Show
    VERIFICATION
    Verification is intended to assist the Chocolatey moderators and community
    in verifying that this package's contents are trustworthy.
    
    Download the zip file from github releases
    Take its sha256
    If it matches what is in package's chocolateyinstall.ps1, it's authentic.
    
    Example:
    
    ```
    invoke-webrequest https://github.com/bazelbuild/bazel/releases/0.3.1/bazel_0.3.1_windows_x86_64.zip -outfile bazel_0.3.1_windows_x86_64.zip
    get-filehash bazel_0.3.1_windows_x86_64.zip -algorithm sha256
    # compare that to what's in <package>/tools/chocolateyinstall.ps1
    ```
    
    See also package build script `<repo>/scripts/packages/chocolatey/buildAndInstall.ps1`.
    

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Dependencies

Maintainer(s)

Software Author(s)

  • The Bazel Authors

Copyright

Copyright 2016 The Bazel Authors. All rights reserved.

Tags

Release Notes

https://github.com/bazelbuild/bazel/releases/tag/0.4.5

Version History

Version Downloads Last updated Status
bazel (Install) 0.4.5-rc7-20170314 14 Tuesday, March 14, 2017 approved
bazel (Install) 0.4.5-rc7 9 Tuesday, March 14, 2017 approved
bazel (Install) 0.4.5-rc6 18 Thursday, March 9, 2017 approved
bazel (Install) 0.4.5-rc5 7 Thursday, March 9, 2017 approved
bazel (Install) 0.4.5-rc4 11 Thursday, March 9, 2017 approved
bazel (Install) 0.4.5-rc2-20170306-124051 12 Monday, March 6, 2017 approved
bazel (Install) 0.4.5-rc2 31 Tuesday, February 28, 2017 approved
bazel (Install) 0.4.5-rc1 16 Monday, February 27, 2017 approved
bazel (Install) 0.4.4.20170314 101 Tuesday, March 14, 2017 approved
Show More

Discussion for the bazel (Install) Package

Ground rules:

  • This discussion is only about bazel (Install) and the bazel (Install) package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or bazel (Install), or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus