release.sh: perform most checks before trying to compile