Build a Chocolatey package that supports ARM64 #617
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
This PR updates the Chocolatey package to be able to install a Windows ARM64 CLI build when running on an ARM64 Windows.
To do this, the build script now handles two binaries, the one for AMD64 and the one for ARM64, each one with its own SHA. Both SHAs are injected in the
chocolateyInstall.ps1.tmpl
template file which is then used as the installation script. At installation time, this script checks if its running on an ARM64 machine or an AMD64 machine and then downloads the appropriate CLI Windows binary.Which issue(s) this PR fixes
Part of #357
Describe testing done for PR
This is hard to test directly because there is no Windows ARM64 version currently published on this repo's Github release page. So what I did was pretend that the
v1.0.0
AMD64 was the ARM64 version, and that thev1.1.0
AMD64 version was the AMD64 version. I built the new Chocolatey package with those "hacks" and then ran it on:v1.1.0
)v1.0.0
)v1.1.0
)I also tested building the new Chocolatey package using VMware's internal build system and confirmed the proper installation script was generated using the expected SHAs for AMD64 and ARM64.
Release note
Additional information
Special notes for your reviewer
The script assumes that the Github binary for Windows ARM64 is named
tanzu-cli-windows-arm64-windows11.zip
.This may need a bit of discussion.