From b70201895877f28ca5e57be3fd3239f0eab737ff Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Fri, 17 Sep 2021 16:48:29 +0200 Subject: [PATCH] Freeze the static site --- project/Build.scala | 3 ++- project/scripts/genDocs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index 791047dbacb8..5dc113673383 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -1419,7 +1419,8 @@ object Build { "https://scala-lang.org/api/versions.json", "-Ydocument-synthetic-types", s"-snippet-compiler:${dottyLibRoot}/scala/quoted=compile" - ) ++ (if (justAPI) Nil else Seq("-siteroot", "docs", "-Yapi-subdirectory"))) + ) + ) if (dottyJars.isEmpty) Def.task { streams.value.log.error("Dotty lib wasn't found") } else if (justAPI) generateDocTask diff --git a/project/scripts/genDocs b/project/scripts/genDocs index aa061d59b613..d136997fe9be 100755 --- a/project/scripts/genDocs +++ b/project/scripts/genDocs @@ -19,7 +19,7 @@ mkdir -pv "$PREVIOUS_SNAPSHOTS_DIR" git remote add doc-remote "https://github.com/lampepfl/dotty-website.git" git fetch doc-remote gh-pages git checkout gh-pages -(cp -vr [03].*/ "$PREVIOUS_SNAPSHOTS_DIR"; true) # Don't fail if no `3.*` found to copy +(cp -vr 0.*/ 3.*/ docs/ blog/ index.html "$PREVIOUS_SNAPSHOTS_DIR"; true) # Don't fail if no `3.*` found to copy git checkout "$GIT_HEAD" ### Generate the current snapshot of the website ### @@ -34,5 +34,5 @@ if [ ! -d "$SITE_OUT_DIR" ]; then fi ### Move previous versions' snapshots to _site ### -mv -v "$PREVIOUS_SNAPSHOTS_DIR"/* "$SITE_OUT_DIR" +mv -vf "$PREVIOUS_SNAPSHOTS_DIR"/* "$SITE_OUT_DIR" rm -rf "$PREVIOUS_SNAPSHOTS_DIR"