From a2c67450ec4dadc3932269d65d90d55f131b0c56 Mon Sep 17 00:00:00 2001 From: Cory Date: Wed, 30 Sep 2020 09:12:57 -0700 Subject: [PATCH] Add versioned docs to build-docs task (#7413) * add launchpad & master versioned doc-builds * Update Makefile Co-authored-by: Amaury Martiny --- Makefile | 13 ++++++++----- docs/versions | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1a8d2bf46e..ef5c4fa89d 100644 --- a/Makefile +++ b/Makefile @@ -201,11 +201,14 @@ godocs: build-docs: @cd docs && \ - while read p; do \ - (git checkout $${p} && npm install && VUEPRESS_BASE="/$${p}/" npm run build) ; \ - mkdir -p ~/output/$${p} ; \ - cp -r .vuepress/dist/* ~/output/$${p}/ ; \ - cp ~/output/$${p}/index.html ~/output ; \ + while read -a p; do \ + branch=$${p[0]} ; \ + path_prefix=$${p[1]} ; \ + (git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \ + mkdir -p ~/output/$${path_prefix} ; \ + cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \ + # Note: the last entry inside the `versions` file will be the default root index.html. + cp ~/output/$${path_prefix}/index.html ~/output ; \ done < versions ; sync-docs: diff --git a/docs/versions b/docs/versions index 1f7391f92b..d5dc85eb28 100644 --- a/docs/versions +++ b/docs/versions @@ -1 +1,2 @@ -master +master master +launchpad/backports v0.39