refactor(mk): move build rules into separate scripts (#855)
See https://github.com/ooni/probe/issues/2218
This commit is contained in:
parent
4e99e5030a
commit
5c0368c862
19 changed files with 539 additions and 273 deletions
19
CLI/check-go-version
Executable file
19
CLI/check-go-version
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
EXPECTED_GOLANG_VERSION=go$(cat GOVERSION)
|
||||
|
||||
printf "checking for go... "
|
||||
if ! command -v go; then
|
||||
echo "not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "checking for go version... "
|
||||
GOLANG_VERSION=$(go version | awk '{print $3}')
|
||||
echo $GOLANG_VERSION
|
||||
if [[ $GOLANG_VERSION != $EXPECTED_GOLANG_VERSION ]]; then
|
||||
echo "FATAL: go version must be $EXPECTED_GOLANG_VERSION instead of $GOLANG_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Reference in a new issue