gobyexample/bios.sh
Mark McGranaghan 8753360214 Verify the checked-in build
Extend bios.sh to ensure that the there are no changes in
the build-time git repo after `tools/build` has been run.
This ensures that the checked-in .go and .sh sources match
the check-in public/ files.
2018-02-01 17:15:00 -05:00

20 lines
478 B
Bash
Executable File

#!/bin/bash
set -ex
mkdir -p src/$PKG && cd src/$PKG
run -s "Cloning" git clone $URL --branch $REF --single-branch .
git reset --hard $SHA
go get github.com/russross/blackfriday
go get github.com/golang/lint/golint
PKGS=$(go list $PKG/... | grep -v examples/variables)
run -s "Linting" golint -set_exit_status $PKGS
PKGS=$(go list $PKG/... | grep -v examples/panic)
run -s "Vetting" go vet -x $PKGS
run -s "Building" tools/build
run -s "Verifying" git diff --exit-code