From 5563b09ac242fb07e031e935c6f28f15baa41e62 Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Tue, 11 Jul 2023 07:36:03 -0600 Subject: [PATCH] hack: use Git-free ROOTDIR convention Signed-off-by: Bjorn Neergaard --- hack/generate-authors.sh | 2 +- hack/validate/no-module | 2 +- hack/with-go-mod.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/generate-authors.sh b/hack/generate-authors.sh index 5133ed5b02..da30edb5fb 100755 --- a/hack/generate-authors.sh +++ b/hack/generate-authors.sh @@ -3,7 +3,7 @@ set -e SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)" +ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)" set -x diff --git a/hack/validate/no-module b/hack/validate/no-module index 67a9c559ad..917cc3e756 100755 --- a/hack/validate/no-module +++ b/hack/validate/no-module @@ -3,7 +3,7 @@ # Check that no one is trying to commit a go.mod. SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)" +ROOTDIR="$(cd "${SCRIPTDIR}/../.." && pwd)" if test -e "${ROOTDIR}/go.mod"; then { diff --git a/hack/with-go-mod.sh b/hack/with-go-mod.sh index 3be44d11ec..7c2448ae24 100755 --- a/hack/with-go-mod.sh +++ b/hack/with-go-mod.sh @@ -9,7 +9,7 @@ set -e SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)" +ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)" if test -e "${ROOTDIR}/go.mod"; then {