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

Replace changelog versions in ./scripts/draft-blog-post.js #9058

Merged
merged 3 commits into from Aug 26, 2020

Conversation

sosukesuzuki
Copy link
Member


const changelogUnreleasedDir = path.join(__dirname, "../changelog_unreleased");
const blogDir = path.join(__dirname, "../website/blog");
const introFile = path.join(changelogUnreleasedDir, "blog-post-intro.md");
const version = require("../package.json").version.replace(/-.+/, "");
const previousVersion = execSync("git describe --tags --abbrev=0")
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about require('prettier/package.json').version

@@ -80,22 +82,24 @@ rimraf.sync(postGlob);

fs.writeFileSync(
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we run prettier.format on this file?

Copy link
Sponsor Member

@fisker fisker Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is created when repo linting with stable, and merge when master already released and updated, so there is a chance this file will fail on lint?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be a chance. But we use this script when before release. So I'm not sure if the problem is fixed with using prettier.format on this script.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use stable prettier format it, it will fail after merge.
If we use master prettier format it, it will fail when sending PR.

😄

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep as it is, for now.

@fisker fisker merged commit 5a12f52 into prettier:master Aug 26, 2020
@sosukesuzuki sosukesuzuki deleted the improve-version-replace-script branch August 26, 2020 03:20
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants