Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
fix tests passing when they should not (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Jan 12, 2020
1 parent 817c00c commit 3251ae5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ci/check_go_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@

set -euo pipefail

BASE_DIR="$PWD"
TEMP_DIR=$( mktemp -d )
function cleanup() {
rm -rf "${TEMP_DIR}"
}
trap cleanup EXIT

cp -r . "${TEMP_DIR}/"
cd $TEMP_DIR
go generate ./...
if ! diff -r . "${TEMP_DIR}"; then
if ! diff -r . "${BASE_DIR}"; then
echo
echo "The generated files aren't up to date."
echo "Update them with the 'go generate ./...' command."
Expand Down

0 comments on commit 3251ae5

Please sign in to comment.