Rename the binary as ooniprobe (#58)
While there run the build container as unpriv user.
This commit is contained in:
parent
f425d3f007
commit
23c8df1f0c
12
build.sh
12
build.sh
|
@ -10,17 +10,19 @@ if [ "$1" = "windows" ]; then
|
||||||
set -x
|
set -x
|
||||||
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \
|
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ \
|
||||||
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 \
|
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 \
|
||||||
go build -o dist/windows/amd64/ooni.exe -v ./cmd/ooni
|
go build -o dist/windows/amd64/ooniprobe.exe -v ./cmd/ooniprobe
|
||||||
|
|
||||||
elif [ "$1" = "linux" ]; then
|
elif [ "$1" = "linux" ]; then
|
||||||
set -x
|
set -x
|
||||||
docker build -t oonibuild .
|
docker build -t oonibuild .
|
||||||
docker run -v `pwd`:/oonibuild -w /oonibuild -t oonibuild \
|
docker run -v `pwd`:/oonibuild -w /oonibuild -t --cap-drop=all \
|
||||||
go build -o dist/linux/amd64/ooni -v ./cmd/ooni
|
--user `id -u`:`id -g` -e 'GOCACHE=/tmp/go/cache' -e 'GOPATH=/tmp/go/path' \
|
||||||
|
oonibuild \
|
||||||
|
go build -o dist/linux/amd64/ooniprobe -v ./cmd/ooniprobe
|
||||||
|
|
||||||
elif [ "$1" = "macos" ]; then
|
elif [ "$1" = "macos" ]; then
|
||||||
set -x
|
set -x
|
||||||
go build -o dist/macos/amd64/ooni -v ./cmd/ooni
|
go build -o dist/macos/amd64/ooniprobe -v ./cmd/ooniprobe
|
||||||
|
|
||||||
elif [ "$1" = "_travis-linux" ]; then
|
elif [ "$1" = "_travis-linux" ]; then
|
||||||
set -x
|
set -x
|
||||||
|
@ -41,7 +43,7 @@ elif [ "$1" = "help" ]; then
|
||||||
echo "Usage: $0 linux | macos | windows"
|
echo "Usage: $0 linux | macos | windows"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Builds OONI on supported systems. The output binary will"
|
echo "Builds OONI on supported systems. The output binary will"
|
||||||
echo "be saved at './dist/<system>/<arch>/ooni[.exe]'."
|
echo "be saved at './dist/<system>/<arch>/ooniprobe[.exe]'."
|
||||||
echo ""
|
echo ""
|
||||||
echo "# Linux"
|
echo "# Linux"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
./dist/${OS_NAME}/amd64/ooni onboard --yes
|
./dist/${OS_NAME}/amd64/ooniprobe onboard --yes
|
||||||
./dist/${OS_NAME}/amd64/ooni run --config testdata/testing-config.json -v --no-collector
|
./dist/${OS_NAME}/amd64/ooniprobe run --config testdata/testing-config.json -v --no-collector
|
||||||
|
|
Loading…
Reference in New Issue
Block a user