From 9a092aa4045c8763d7942e7947140b485a986841 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Sun, 3 Jun 2018 22:23:34 -0500 Subject: [PATCH] Skip doc upload if DOC_UPLOAD_KEY not provided. --- build-docs.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build-docs.sh b/build-docs.sh index f7d3e6c..03976bf 100644 --- a/build-docs.sh +++ b/build-docs.sh @@ -67,7 +67,11 @@ END make html -echo "${DOC_UPLOAD_KEY}" > doc_upload_key -chmod 0600 doc_upload_key -RSYNC_RSH="ssh -F doc_upload_ssh_config" ./upload-docs.sh || { rm doc_upload_key; exit 1; } -rm doc_upload_key +if test -n "${DOC_UPLOAD_KEY}"; then + echo "${DOC_UPLOAD_KEY}" > doc_upload_key + chmod 0600 doc_upload_key + RSYNC_RSH="ssh -F doc_upload_ssh_config" ./upload-docs.sh || { rm doc_upload_key; exit 1; } + rm doc_upload_key +else + echo "Skipping upload. DOC_UPLOAD_KEY was not provided." +fi -- GitLab