hack/go-mod-prepare.sh: find root robustly; make steps transparent

Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
This commit is contained in:
Bjorn Neergaard 2022-11-14 18:32:30 -07:00
parent 9f004830a5
commit af8e955e8f
No known key found for this signature in database

View file

@ -1,8 +1,13 @@
#!/usr/bin/env bash
ROOTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
set -e
cat > "${ROOTDIR}/go.mod" << EOF
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)"
set -x
tee "${ROOTDIR}/go.mod" << EOF
module github.com/docker/docker
go 1.18