#!/bin/bash
set -exuo pipefail
export GO111MODULE=on
echo Generating code
go generate ./...
if [[ $(git --no-pager diff) ]] ; then
    echo "you need to run "go generate ./..." and commit the changes"
    git --no-pager diff
    exit 1
fi
