From fb8b9836223b148e4f1691b3f62d434b0eb0722d Mon Sep 17 00:00:00 2001 From: Martin Taillefer Date: Thu, 12 Sep 2019 11:49:23 -0700 Subject: [PATCH] Fix archive build. --- Makefile.core.mk | 3 --- scripts/gen_archive_site.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.core.mk b/Makefile.core.mk index 4ec4ebac88..24f5fe267a 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -49,9 +49,6 @@ netlify: netlify_install @scripts/build_site.sh @scripts/gen_site.sh "$(baseurl)" -netlify_archive: - @scripts/gen_archive_site.sh "$(baseurl)" - archive: @scripts/gen_archive_site.sh "$(baseurl)" diff --git a/scripts/gen_archive_site.sh b/scripts/gen_archive_site.sh index 70ce973098..f100d6bc2a 100755 --- a/scripts/gen_archive_site.sh +++ b/scripts/gen_archive_site.sh @@ -42,10 +42,9 @@ TOBUILD_JEKYLL=( TMP=$(mktemp -d) mkdir "${TMP}/archive" -GITDIR=istio.io -rm -fr ${GITDIR} -git clone https://github.com/istio/istio.io.git -cd ${GITDIR} +pushd "${TMP}" || exit +git clone -q https://github.com/istio/istio.io.git +pushd "istio.io" || exit for rel in "${TOBUILD[@]}"; do NAME=$(echo "$rel" | cut -d : -f 1) @@ -82,7 +81,8 @@ for rel in "${TOBUILD_JEKYLL[@]}"; do done echo "### Building landing page" -cd .. +popd || exit +popd || exit # Adjust a few things for archive_landing rm -fr content/en/about content/en/docs content/en/faq content/en/blog content/zh @@ -97,7 +97,7 @@ scripts/build_site.sh scripts/gen_site.sh "$1" mv public/* "${TMP}/archive" -rm -fr "${GITDIR}" public +rm -fr public mv "${TMP}/archive" public rm -fr "${TMP}"