Skip to content

Commit 2820bf8

Browse files
committed
add some more logging to website script
1 parent 2835e96 commit 2820bf8

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scripts/generateSearch.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ markdown.setOptions({
2020
// 5.13.5 -> 5.x, 6.8.2 -> 6.x, etc.
2121
version = version.slice(0, version.indexOf('.')) + '.x';
2222

23+
console.log('Generating search for version', version);
24+
2325
const contentSchema = new mongoose.Schema({
2426
title: { type: String, required: true },
2527
body: { type: String, required: true },
@@ -116,12 +118,16 @@ function generateContents() {
116118
}
117119

118120
async function generateSearch(config) {
121+
console.log('Connect to', config.uri);
119122
await mongoose.connect(config.uri, { dbName: 'mongoose' });
120123

121124
// wait for the index to be created
125+
console.log('Init Content model...');
122126
await Content.init();
123127

128+
console.log('Deleting existing content...');
124129
await Content.deleteMany({ version });
130+
console.log('Deleted content for version', version);
125131

126132
const contents = generateContents();
127133

scripts/website.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ function deleteAllHtmlFiles() {
147147
}
148148

149149
function moveDocsToTemp() {
150+
console.log('Moving docs to tmp dir...');
150151
if (!versionObj.versionedPath) {
151152
throw new Error('Cannot move unversioned deploy to /tmp');
152153
}
@@ -622,7 +623,9 @@ if (isMain) {
622623
}
623624

624625
if (generateSearchPromise) {
626+
console.log('Generating search...');
625627
await generateSearchPromise;
628+
console.log('Search generated successfully');
626629
}
627630

628631
console.log('Done Processing');

0 commit comments

Comments
 (0)