Skip to content

Commit dec09b8

Browse files
committed
chore(dev-utils): autoConfirm flag passed to initBlog
1 parent 9a1f1f2 commit dec09b8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/dev-utils/src/release.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ A token can be created at:
116116

117117
await changelogData();
118118
run(`npx lerna version ${type} --no-push${yes}`);
119-
const changelog = await initBlog();
119+
const changelog = await initBlog(autoYes);
120120

121121
const percentChanged = await libsize({
122122
umd: true,

packages/dev-utils/src/utils/initBlog.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { verify } from "./verify";
99

1010
const NEW_ENTRY = /^#{1,2}\s+\[\d/;
1111

12-
async function getCurrentReleaseNotes(): Promise<string> {
12+
async function getCurrentReleaseNotes(autoConfirm: boolean): Promise<string> {
1313
log.info("Update the root CHANGELOG.md with any additional changes.");
14-
if (!(await verify("Continue with the release?"))) {
14+
if (!(await verify("Continue with the release?", autoConfirm))) {
1515
process.exit(1);
1616
}
1717

@@ -44,12 +44,12 @@ async function getCurrentReleaseNotes(): Promise<string> {
4444
* @returns the current release markdown that can be used to generate a github
4545
* release for the current tag.
4646
*/
47-
export async function initBlog(): Promise<string> {
47+
export async function initBlog(autoConfirm: boolean): Promise<string> {
4848
const blogPath = join(documentationRoot, src, "blogs", "index.md");
4949
const version = (await getPackageJson("react-md")).version;
5050
const blog = await readFile(blogPath, "utf-8");
5151

52-
const currentReleaseNotes = await getCurrentReleaseNotes();
52+
const currentReleaseNotes = await getCurrentReleaseNotes(autoConfirm);
5353
const blogMarkdown = currentReleaseNotes
5454
// create smaller headings and remove margin
5555
.replace(/^(###)\s+(.+)$/gm, "##### $2<!-- no-margin -->")

0 commit comments

Comments
 (0)