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

Add a script that generates changelog for patch release #11052

Merged
merged 1 commit into from Jun 26, 2021

Conversation

sosukesuzuki
Copy link
Member

Description

  • Add ./scripts/changelog-for-patch.mjs
  • Extract common functions to ./scripts/utils/changelog
  • Use changelog-for-patch.mjs from release script

Checklist

Try the playground for this PR


function parseArgv() {
const argv = minimist(process.argv.slice(2));
const previousVersion = argv["prev-version"];
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Shouldn't previous version always require("prettier").version?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's correct in most cases. However, the release script actually get the previous version in a different way(ref:

const { stdout: previousVersion } = await runGit([
"describe",
"--tags",
"--abbrev=0",
]);
). So I think it is safer to be able to specify it as an argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

@fisker What do you think? I want to merge this for next patch version.

- Add ./scripts/changelog-for-patch.mjs
- Extract common functions to ./scripts/utils/changelog
- Use changelog-for-patch.mjs from release script
Copy link
Sponsor Member

@fisker fisker left a comment

Choose a reason for hiding this comment

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

LGTM, should we call prettier to format file? Maybe it will fail on lint ?

@sosukesuzuki
Copy link
Member Author

should we call prettier to format file? Maybe it will fail on lint ?

We call prettier at with --write

await logPromise(
"Re-running Prettier on docs",
runYarn(["lint:prettier", "--write"])
);

@sosukesuzuki sosukesuzuki merged commit 2faf01b into prettier:main Jun 26, 2021
@sosukesuzuki sosukesuzuki deleted the change-log-script branch June 26, 2021 07:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
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