Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chocolatey package build scripts #1949

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/packages/chocolatey/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ rm -force -ErrorAction SilentlyContinue ./*.nupkg
rm -force -ErrorAction SilentlyContinue ./*.zip
rm -force -ErrorAction SilentlyContinue ./bazel.nuspec
rm -force -ErrorAction SilentlyContinue ./tools/chocolateyinstall.ps1
rm -force -ErrorAction SilentlyContinue ./tools/chocolateyuninstall.ps1
rm -force -ErrorAction SilentlyContinue ./tools/LICENSE.txt

if ($isRelease) {
Invoke-WebRequest "$($tvUri).sha256" -UseBasicParsing -passthru -outfile sha256.txt
Expand Down
4 changes: 0 additions & 4 deletions scripts/packages/chocolatey/chocolateyinstall.ps1.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ ps_var_checksumType64 = ps_var_checksumType
ps_var_toolsDir = Split-Path -parent ps_var_MyInvocation.MyCommand.Definition
ps_var_packageDir = Split-Path -parent ps_var_toolsDir
ps_var_binRoot = (Get-ToolsLocation) -replace "\\", "/"
write-host "package directory: ps_var_packageDir"
write-host "destination directory: ps_var_packageDir"
write-host "url: ps_var_url"
write-host "url64bit: ps_var_url64bit"

Install-ChocolateyZipPackage -PackageName "ps_var_packageName" escape_char
-Url "ps_var_url" escape_char
Expand Down
6 changes: 3 additions & 3 deletions scripts/packages/chocolatey/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ param(

choco uninstall bazel --force -y

choco install "./bazel.$($version).nupkg" --verbose --debug --force -y
choco install bazel --verbose --debug --force -y -s ".;https://chocolatey.org/api/v2/"

if ($LASTEXITCODE -ne 0)
{
Expand All @@ -16,8 +16,8 @@ write-host @"
The package should have installed without errors.

Now:
* open an msys2 shell
* open a new shell (this should work in msys2, cmd, powershell)
* Make sure your environment is accurate (see ``./tools/chocolateyinstall.ps1`` output)
* run ``bazel version`` in that msys2 shell
* run ``bazel version`` in that shell
* ... and you should get a version number back
"@