1#!/bin/bash
2GITBRANCH=`git rev-parse --abbrev-ref HEAD`
3#We intend to only run gas on release branches.
4if [ "master" != $GITBRANCH ]; then
5    exit 0
6fi
7REALEXITSTATUS=0
8go get -u github.com/HewlettPackard/gas
9gas -skip=*/arm/*/models.go -skip=*/management/examples/*.go -skip=*vendor* -skip=*/Gododir/* ./... | tee /dev/stderr
10REALEXITSTATUS=$(($REALEXITSTATUS+$?))
11gas -exclude=G101 ./arm/... ./management/examples/... | tee /dev/stderr
12REALEXITSTATUS=$(($REALEXITSTATUS+$?))
13gas -exclude=G204 ./Gododir/... | tee /dev/stderr
14REALEXITSTATUS=$(($REALEXITSTATUS+$?))
15exit $REALEXITSTATUS