Introduce Release script (#4631)
This commit is contained in:
1 parent
f27f6c525b
commit
54b1f8562d
20 files changed
+1009
-31
No files matched your search
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
const chalk = require("chalk");
|
||||
const dedent = require("dedent");
|
||||
const { exec } = require("child-process-promise");
|
||||
const { logPromise, waitForEnter } = require("../utils");
|
||||
|
||||
module.exports = async function({ dry, version }) {
|
||||
if (dry) {
|
||||
return;
|
||||
}
|
||||
|
||||
await logPromise("Publishing to npm", exec("npm publish", { cwd: "./dist" }));
|
||||
|
||||
console.log(
|
||||
dedent(chalk`
|
||||
{green.bold Prettier ${version} published!}
|
||||
|
||||
{yellow.bold Some manual steps are necessary.}
|
||||
|
||||
{bold.underline Create a GitHub Release}
|
||||
- Go to {cyan.underline https://github.com/prettier/prettier/releases/new?tag=${version}}
|
||||
- Copy release notes from {yellow CHANGELOG.md}
|
||||
- Attach all files in {yellow dist/} folder.
|
||||
- Press {bgGreen.black Publish release }
|
||||
|
||||
{bold.underline Test the new releae}
|
||||
- In a new session, run {yellow npm i prettier@latest} in another directory
|
||||
- Test the API and CLI
|
||||
|
||||
After that, we can proceed to bump this repo's Prettier dependency.
|
||||
Press any key to continue.
|
||||
`)
|
||||
);
|
||||
await waitForEnter();
|
||||
};
|
||||
Reference in new issue
Block a user