Make a presubmit script to run all checkswq

This commit is contained in:
Victor Marmol 2015-05-20 10:56:17 -07:00
parent f59fce7e28
commit d584698f12
6 changed files with 26 additions and 6 deletions

View File

@ -11,8 +11,4 @@ before_script:
- sudo service influxdb start
script:
- export PATH=$PATH:$HOME/gopath/bin
- ./deploy/check_gofmt.sh .
- ./hooks/check_boilerplate.sh
- go vet github.com/google/cadvisor/...
- godep go test -v -race -test.short github.com/google/cadvisor/...
- godep go build github.com/google/cadvisor
- ./build/presubmit.sh

View File

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
REF_FILE="./hooks/boilerplate.go.txt"
REF_FILE="./build/boilerplate.go.txt"
if [ ! -e $REF_FILE ]; then
echo "Missing reference file: " ${REF_FILE}
exit 1

24
build/presubmit.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
set -x
./build/check_gofmt.sh .
./build/check_boilerplate.sh
go vet github.com/google/cadvisor/...
godep go test -v -race -test.short github.com/google/cadvisor/...
godep go build github.com/google/cadvisor