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

fix tests passing when they should not #378

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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