Commit a509cbf9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46829 from cblecker/swagger-dir-fix

Automatic merge from submit-queue (batch tested with PRs 47921, 45984, 46829, 46896, 46923) Create output_dir if doesn't exist **What this PR does / why we need it**: Minor fix to the swagger spec gen, that if the directory doesn't exist, create it before copying. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents dafe5783 f75274e0
...@@ -154,6 +154,9 @@ kube::swagger::gen_api_ref_docs() { ...@@ -154,6 +154,9 @@ kube::swagger::gen_api_ref_docs() {
echo "Moving api reference docs from ${output_tmp} to ${output_dir}" echo "Moving api reference docs from ${output_tmp} to ${output_dir}"
# Create output_dir if doesn't exist. Prevents error on copy.
mkdir -p "${output_dir}"
cp -af "${output_tmp}"/* "${output_dir}" cp -af "${output_tmp}"/* "${output_dir}"
rm -r "${output_tmp}" rm -r "${output_tmp}"
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment