Fix archive build.

This commit is contained in:
Martin Taillefer 2019-09-12 11:49:23 -07:00
parent 0f82d03ee2
commit fb8b983622
2 changed files with 6 additions and 9 deletions

View File

@ -49,9 +49,6 @@ netlify: netlify_install
@scripts/build_site.sh @scripts/build_site.sh
@scripts/gen_site.sh "$(baseurl)" @scripts/gen_site.sh "$(baseurl)"
netlify_archive:
@scripts/gen_archive_site.sh "$(baseurl)"
archive: archive:
@scripts/gen_archive_site.sh "$(baseurl)" @scripts/gen_archive_site.sh "$(baseurl)"

View File

@ -42,10 +42,9 @@ TOBUILD_JEKYLL=(
TMP=$(mktemp -d) TMP=$(mktemp -d)
mkdir "${TMP}/archive" mkdir "${TMP}/archive"
GITDIR=istio.io pushd "${TMP}" || exit
rm -fr ${GITDIR} git clone -q https://github.com/istio/istio.io.git
git clone https://github.com/istio/istio.io.git pushd "istio.io" || exit
cd ${GITDIR}
for rel in "${TOBUILD[@]}"; do for rel in "${TOBUILD[@]}"; do
NAME=$(echo "$rel" | cut -d : -f 1) NAME=$(echo "$rel" | cut -d : -f 1)
@ -82,7 +81,8 @@ for rel in "${TOBUILD_JEKYLL[@]}"; do
done done
echo "### Building landing page" echo "### Building landing page"
cd .. popd || exit
popd || exit
# Adjust a few things for archive_landing # Adjust a few things for archive_landing
rm -fr content/en/about content/en/docs content/en/faq content/en/blog content/zh 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" scripts/gen_site.sh "$1"
mv public/* "${TMP}/archive" mv public/* "${TMP}/archive"
rm -fr "${GITDIR}" public rm -fr public
mv "${TMP}/archive" public mv "${TMP}/archive" public
rm -fr "${TMP}" rm -fr "${TMP}"