From 3d7970a673d88735da6e8b196ceea5380f614fab Mon Sep 17 00:00:00 2001 From: Ika Date: Sun, 20 Jan 2019 11:43:26 +0800 Subject: [PATCH] chore(scripts): add update-stable-docs to release script (#5772) Ref: https://github.com/prettier/prettier/pull/5676#issuecomment-449624247 --- scripts/release/steps/update-version.js | 5 +++++ website/package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/release/steps/update-version.js b/scripts/release/steps/update-version.js index 033ae7406..b9c932f63 100644 --- a/scripts/release/steps/update-version.js +++ b/scripts/release/steps/update-version.js @@ -1,5 +1,6 @@ "use strict"; +const execa = require("execa"); const { logPromise, readJson, writeJson, processFile } = require("../utils"); async function bump({ version }) { @@ -14,6 +15,10 @@ async function bump({ version }) { processFile(".github/ISSUE_TEMPLATE/integration.md", content => content.replace(/^(- Prettier Version: ).*?$/m, `$1${version}`) ); + + await execa("yarn", ["update-stable-docs"], { + cwd: "./website" + }); } module.exports = async function(params) { diff --git a/website/package.json b/website/package.json index f176b371e..45b31199b 100644 --- a/website/package.json +++ b/website/package.json @@ -5,7 +5,8 @@ "publish-gh-pages": "docusaurus-publish", "start": "concurrently \"docusaurus-start\" \"webpack -d -w\"", "svgo": "svgo --pretty --indent=2 --config=svgo.yml", - "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z" + "svgo-all": "find static | grep '\\.svg$' | xargs -Iz -n 1 yarn svgo z", + "update-stable-docs": "rm -rf ./versioned_docs ./versions.json && docusaurus-version stable" }, "dependencies": { "clipboard": "2.0.0",