From c90a12c283698befcafd2c86f8bd8942428fe80b Mon Sep 17 00:00:00 2001 From: Kai Cataldo <7041728+kaicataldo@users.noreply.github.com> Date: Fri, 19 Jul 2019 12:44:36 -0400 Subject: [PATCH] Chore: update release script for new website repo (#12006) --- Makefile.js | 22 +++++++++++----------- tools/update-readme.js | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile.js b/Makefile.js index 9bb9e12ad6d..02386d2f461 100644 --- a/Makefile.js +++ b/Makefile.js @@ -56,8 +56,8 @@ const NODE = "node ", // intentional extra space TEMP_DIR = "./tmp/", DEBUG_DIR = "./debug/", BUILD_DIR = "build", - DOCS_DIR = "../eslint.github.io/docs", - SITE_DIR = "../eslint.github.io/", + DOCS_DIR = "../website/docs", + SITE_DIR = "../website/", PERF_TMP_DIR = path.join(TEMP_DIR, "eslint", "performance"), // Utilities - intentional extra space at the end of each string @@ -139,7 +139,7 @@ function generateBlogPost(releaseInfo, prereleaseMajorVersion) { now = new Date(), month = now.getMonth() + 1, day = now.getDate(), - filename = `../eslint.github.io/_posts/${now.getFullYear()}-${ + filename = `../website/_posts/${now.getFullYear()}-${ month < 10 ? `0${month}` : month}-${ day < 10 ? `0${day}` : day}-eslint-v${ releaseInfo.version}-released.md`; @@ -156,8 +156,8 @@ function generateBlogPost(releaseInfo, prereleaseMajorVersion) { */ function generateFormatterExamples(formatterInfo, prereleaseVersion) { const output = ejs.render(cat("./templates/formatter-examples.md.ejs"), formatterInfo); - let filename = "../eslint.github.io/docs/user-guide/formatters/index.md", - htmlFilename = "../eslint.github.io/docs/user-guide/formatters/html-formatter-example.html"; + let filename = "../website/docs/user-guide/formatters/index.md", + htmlFilename = "../website/docs/user-guide/formatters/html-formatter-example.html"; if (prereleaseVersion) { filename = filename.replace("/docs", `/docs/${prereleaseVersion}`); @@ -176,7 +176,7 @@ function generateFormatterExamples(formatterInfo, prereleaseVersion) { * @returns {void} */ function generateRuleIndexPage() { - const outputFile = "../eslint.github.io/_data/rules.yml", + const outputFile = "../website/_data/rules.yml", categoryList = "conf/category-list.json", categoriesData = JSON.parse(cat(path.resolve(categoryList))); @@ -216,7 +216,7 @@ function generateRuleIndexPage() { } /** - * Creates a git commit and tag in an adjacent `eslint.github.io` repository, without pushing it to + * Creates a git commit and tag in an adjacent `website` repository, without pushing it to * the remote. This assumes that the repository has already been modified somehow (e.g. by adding a blogpost). * @param {string} [tag] The string to tag the commit with * @returns {void} @@ -237,7 +237,7 @@ function commitSiteToGit(tag) { } /** - * Publishes the changes in an adjacent `eslint.github.io` repository to the remote. The + * Publishes the changes in an adjacent `website` repository to the remote. The * site should already have local commits (e.g. from running `commitSiteToGit`). * @returns {void} */ @@ -251,7 +251,7 @@ function publishSite() { /** * Updates the changelog, bumps the version number in package.json, creates a local git commit and tag, - * and generates the site in an adjacent `eslint.github.io` folder. + * and generates the site in an adjacent `website` folder. * @returns {void} */ function generateRelease() { @@ -266,7 +266,7 @@ function generateRelease() { /** * Updates the changelog, bumps the version number in package.json, creates a local git commit and tag, - * and generates the site in an adjacent `eslint.github.io` folder. + * and generates the site in an adjacent `website` folder. * @param {string} prereleaseId The prerelease identifier (alpha, beta, etc.) * @returns {void} */ @@ -303,7 +303,7 @@ function generatePrerelease(prereleaseId) { } /** - * Publishes a generated release to npm and GitHub, and pushes changes to the adjacent `eslint.github.io` repo + * Publishes a generated release to npm and GitHub, and pushes changes to the adjacent `website` repo * to remote repo. * @returns {void} */ diff --git a/tools/update-readme.js b/tools/update-readme.js index ce6c6e1910b..24fe3c01d2b 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -1,6 +1,6 @@ /** * @fileoverview Script to update the README with team and sponsors. - * Note that this requires eslint.github.io to be available in the same + * Note that this requires eslint/website to be available in the same * directory as the eslint repo. * * node tools/update-readme.js @@ -23,7 +23,7 @@ const ejs = require("ejs"); //----------------------------------------------------------------------------- const README_FILE_PATH = path.resolve(__dirname, "../README.md"); -const WEBSITE_DATA_PATH = path.resolve(__dirname, "../../eslint.github.io/_data"); +const WEBSITE_DATA_PATH = path.resolve(__dirname, "../../website/_data"); const team = JSON.parse(fs.readFileSync(path.join(WEBSITE_DATA_PATH, "team.json"))); const allSponsors = JSON.parse(fs.readFileSync(path.join(WEBSITE_DATA_PATH, "sponsors.json")));