diff --git a/src/runtime/Makefile b/src/runtime/Makefile index 52c876bd4..479c08b5d 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -653,6 +653,9 @@ handle_vendor: go mod vendor go mod verify +vendor: handle_vendor + ./hack/tree_status.sh + clean: $(QUIET_CLEAN)rm -f \ $(CONFIGS) \ diff --git a/src/runtime/hack/tree_status.sh b/src/runtime/hack/tree_status.sh new file mode 100755 index 000000000..482710774 --- /dev/null +++ b/src/runtime/hack/tree_status.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Copyright 2021 Red Hat Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +set -e + +STATUS=$(git status --porcelain) +if [[ -z $STATUS ]]; then + echo "tree is clean" +else + echo "tree is dirty, please commit all changes" + echo "" + echo "$STATUS" + git diff + exit 1 +fi