diff --git a/Makefile.js b/Makefile.js index 1f353687398..a4b9f8bc4c1 100644 --- a/Makefile.js +++ b/Makefile.js @@ -287,6 +287,13 @@ function generateRelease() { generateBlogPost(releaseInfo); commitSiteToGit(`v${releaseInfo.version}`); + echo("Updating version in docs package"); + const docsPackagePath = path.join(__dirname, "docs", "package.json"); + const docsPackage = require(docsPackagePath); + + docsPackage.version = releaseInfo.version; + fs.writeFileSync(docsPackagePath, `${JSON.stringify(docsPackage, null, 4)}\n`); + echo("Updating commit with docs data"); exec("git add docs/ && git commit --amend --no-edit"); exec(`git tag -a -f v${releaseInfo.version} -m ${releaseInfo.version}`); diff --git a/docs/package.json b/docs/package.json index 558d41f97a9..6137ce86a2e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,7 +1,7 @@ { "name": "docs-eslint", "private": true, - "version": "1.0.0", + "version": "8.23.0", "description": "", "main": "index.js", "keywords": [], diff --git a/docs/src/_data/eslintVersion.js b/docs/src/_data/eslintVersion.js index cd60276b37a..24964276c0d 100644 --- a/docs/src/_data/eslintVersion.js +++ b/docs/src/_data/eslintVersion.js @@ -14,7 +14,7 @@ const path = require("path"); // Initialization //----------------------------------------------------------------------------- -const pkgPath = path.resolve(__dirname, "../../../package.json"); +const pkgPath = path.resolve(__dirname, "../../package.json"); const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8")); const { ESLINT_VERSION } = process.env; @@ -23,7 +23,7 @@ const { ESLINT_VERSION } = process.env; //----------------------------------------------------------------------------- /* - * Because we want to differentiate between the development branch and the + * Because we want to differentiate between the development branch and the * most recent release, we need a way to override the version. The * ESLINT_VERSION environment variable allows us to set this to override * the value displayed on the website. The most common case is we will set