Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update release script for new website repo #12006

Merged
merged 1 commit into from Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions Makefile.js
Expand Up @@ -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
Expand Down Expand Up @@ -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`;
Expand All @@ -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}`);
Expand All @@ -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)));

Expand Down Expand Up @@ -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}
Expand All @@ -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}
*/
Expand All @@ -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() {
Expand All @@ -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}
*/
Expand Down Expand Up @@ -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}
*/
Expand Down
4 changes: 2 additions & 2 deletions 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
Expand All @@ -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")));
Expand Down