feat: use an env var to control arch when building orbit for local tuf server (#16263)

Just a small developer quality of life update

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
This commit is contained in:
Jahziel Villasana-Espinoza 2024-03-01 09:07:00 -05:00 committed by GitHub
parent cbd1a142b4
commit 2f2bee8522
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View file

@ -55,6 +55,14 @@ LINUX_TEST_EXTENSIONS="./tools/test_extensions/hello_world/linux/hello_world_lin
./tools/tuf/test/main.sh
```
To build for a specific architecture, you can pass the `GOARCH` environment variable:
``` shell
[...]
GOARCH=arm64 # defaults to amd64
[...]
./tools/tuf/test/main.sh
```
# Add new updates
To add new updates (osqueryd or orbit), use `push_target.sh`.

View file

@ -61,13 +61,9 @@ for system in $SYSTEMS; do
rm $osqueryd_path
goose_value="$system"
goarch_value="" # leave it empty to use the default for the system
goarch_value=${GOARCH:-}
if [[ $system == "macos" ]]; then
goose_value="darwin"
# for all platforms except Darwin, GOARCH is hardcoded to amd64 to
# prevent cross compilation issues when building macOS arm64 binaries
# from Linux (CGO + libraries are required)
goarch_value="amd64"
fi
orbit_target=orbit-$system
if [[ $system == "windows" ]]; then