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.
		
			
				
	
	
		
			13 lines
		
	
	
		
			323 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			323 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/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
 |