File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ markdown.setOptions({
2020// 5.13.5 -> 5.x, 6.8.2 -> 6.x, etc.
2121version = version . slice ( 0 , version . indexOf ( '.' ) ) + '.x' ;
2222
23+ console . log ( 'Generating search for version' , version ) ;
24+
2325const contentSchema = new mongoose . Schema ( {
2426 title : { type : String , required : true } ,
2527 body : { type : String , required : true } ,
@@ -116,12 +118,16 @@ function generateContents() {
116118}
117119
118120async 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
Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ function deleteAllHtmlFiles() {
147147}
148148
149149function 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' ) ;
You can’t perform that action at this time.
0 commit comments