Make sure the _output folder exists before using it from module-graph.sh

This commit is contained in:
Noah Kantrowitz 2020-07-07 01:19:59 -07:00 committed by GitHub
parent aaf40adcd0
commit a1fb2f9c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,7 @@ kubernetes_dependencies()
go mod graph | grep -E "^.*k8s.io.*k8s.io.*$" | sed -E 's|@\S+ | |g' | sed -E 's|@\S+$||g' | sed -E 's/[\.\/\-]/_/g' | sort | uniq | sed -E 's| | -> |g' | sed -E 's|^| |g' >> _output/module-dependencies.dot || error_exit "Failed to generate kubernetes dependencies in DOT file"
}
mkdir -p _output
echo "digraph module_dependencies {" > _output/module-dependencies.dot || error_exit "Failed to open DOT file"
if [[ -n "$1" && $1 == "staging" ]]; then
echo "Generating just staging modules"