Skip to content

Commit

Permalink
tests/lib/prepare-restore: build goqj statically, make it available u…
Browse files Browse the repository at this point in the history
…nder tests/bin

Since gojq may be running on a different system, make sure to build it
statically. Also place the binary under $PROJECT_PATH/tests/bin which is
automaticall added to $PATH.

Signed-off-by: Maciej Borzecki <[email protected]>
  • Loading branch information
bboozzoo committed Nov 7, 2024
1 parent 2e8b7dd commit 08eab5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/lib/prepare-restore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,9 @@ prepare_project() {
# major differences:
# - map keys are sorted by default
# - with --yaml-input, can parse YAML
go install github.com/itchyny/gojq/cmd/[email protected]
GOBIN=$PROJECT_PATH/tests/bin \
CGO_ENABLED=0 \
go install github.com/itchyny/gojq/cmd/[email protected]
}

prepare_project_each() {
Expand Down

0 comments on commit 08eab5a

Please sign in to comment.