Skip to content

Commit a322067

Browse files
committed
Merge branch '8.x'
2 parents 93c780b + 2820bf8 commit a322067

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"docs:prepare:publish:5x": "git checkout 5.x && git merge 5.x && npm run docs:clean:stable && npm run docs:generate && npm run docs:copy:tmp && git checkout gh-pages && npm run docs:copy:tmp:5x",
8282
"docs:prepare:publish:6x": "git checkout 6.x && git merge 6.x && npm run docs:clean:stable && env DOCS_DEPLOY=true npm run docs:generate && mv ./docs/6.x ./tmp && git checkout gh-pages && npm run docs:copy:tmp:6x",
8383
"docs:prepare:publish:7x": "env DOCS_DEPLOY=true npm run docs:generate && git checkout gh-pages && rimraf ./docs/7.x && mv ./tmp ./docs/7.x",
84-
"docs:prepare:publish:8x": "git checkout gh-pages && git merge 8.x && npm run docs:generate",
84+
"docs:prepare:publish:8x": "env DOCS_DEPLOY=true npm run docs:generate && git checkout gh-pages && rimraf ./docs/8.x && mv ./tmp ./docs/8.x",
8585
"docs:check-links": "blc http://127.0.0.1:8089 -ro",
8686
"lint": "eslint .",
8787
"lint-js": "eslint . --ext .js --ext .cjs",

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)