Skip to content

Commit

Permalink
write parent package version to docs package
Browse files Browse the repository at this point in the history
  • Loading branch information
jugalthakkar committed Aug 31, 2022
1 parent 9883174 commit df467c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile.js
Expand Up @@ -282,8 +282,12 @@ function generateRelease() {
generateBlogPost(releaseInfo);
commitSiteToGit(`v${releaseInfo.version}`);

echo("Generating eslintVersion.js for docs");
fs.writeFileSync("docs/src/_data/eslintVersion.js", `module.exports = "${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));

echo("Updating commit with docs data");
exec("git add docs/ && git commit --amend --no-edit");
Expand Down

0 comments on commit df467c3

Please sign in to comment.