Another fix for archives.

This commit is contained in:
mtail 2019-06-19 14:51:12 -07:00
parent e37462cf17
commit 527312311f
1 changed files with 11 additions and 6 deletions

View File

@ -3,6 +3,8 @@
# Build the archive site
#
BASEURL="$1"
# List of name:tagOrBranch
TOBUILD=(
v1.1:release-1.1
@ -37,11 +39,12 @@ for rel in "${TOBUILD[@]}"
do
NAME=$(echo $rel | cut -d : -f 1)
TAG=$(echo $rel | cut -d : -f 2)
BASEURL=$(echo /$NAME)
echo "### Building '$NAME' from $TAG for $BASEURL"
URL=$(echo ${BASEURL}/${NAME})
echo "### Building '${NAME}' from ${TAG} for ${URL}"
git checkout ${TAG}
scripts/gen_site.sh ${BASEURL}
scripts/gen_site.sh ${URL}
mv public ${TMP}/archive/${NAME}
echo "- name: \"${NAME}\"" >> ${TMP}/archives.yml
@ -53,9 +56,11 @@ for rel in "${TOBUILD_JEKYLL[@]}"
do
NAME=$(echo $rel | cut -d : -f 1)
TAG=$(echo $rel | cut -d : -f 2)
echo "### Building '$NAME' from $TAG"
URL=$(echo ${BASEURL}/${NAME})
echo "### Building '${NAME}' from ${TAG} for ${URL}"
git checkout ${TAG}
echo "baseurl: /$NAME" > config_override.yml
echo "baseurl: ${URL}" > config_override.yml
bundle install
bundle exec jekyll build --config _config.yml,config_override.yml
@ -79,7 +84,7 @@ sed -i 's/archive_landing: false/archive_landing: true/g' data/args.yml
cp ${TMP}/archives.yml data
scripts/build_site.sh
scripts/gen_site.sh "https://archive.istio.io"
scripts/gen_site.sh "$1"
mv public/* ${TMP}/archive
rm -fr ${GITDIR} public