feat(make): build ooniprobe for darwin, windows, and linux (#328)
In https://github.com/ooni/probe/issues/1466, a user is asking about arm64 builds for Debian. We already had some code for that in https://github.com/ooni/probe-cli/pull/311. Let us adapt the code to the `./make` script to have arm64 builds. While there, also adapt the code for darwin and windows.
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
if [ "$GOARCH" = "" ]; then
|
||||
echo 'fatal: $GOARCH is not set' 1>&2
|
||||
exit 1
|
||||
fi
|
||||
set -x
|
||||
apk update
|
||||
apk upgrade
|
||||
apk add --no-progress gcc git linux-headers musl-dev
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=$GOARCH go build -o ./CLI/linux/$GOARCH/ \
|
||||
-ldflags='-s -w -extldflags "-static"' "$@" ./cmd/ooniprobe
|
||||
Reference in New Issue
Block a user