Skip to content

Commit 2acc3f5

Browse files
authored
Merge pull request #13894 from Automattic/vkarpov15/generate-search-improvements
chore: print progress when running generateSearch script
2 parents 5a53e62 + 4b5749c commit 2acc3f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/generateSearch.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ async function run() {
132132
await Content.init();
133133

134134
await Content.deleteMany({ version });
135+
let count = 0;
135136
for (const content of contents) {
136137
if (version === '7.x') {
137138
let url = content.url.startsWith('/') ? content.url : `/${content.url}`;
@@ -143,6 +144,7 @@ async function run() {
143144
const url = content.url.startsWith('/') ? content.url : `/${content.url}`;
144145
content.url = `/docs/${version}/docs${url}`;
145146
}
147+
console.log(`${++count} / ${contents.length}`);
146148
await content.save();
147149
}
148150

0 commit comments

Comments
 (0)