Skip to content

Commit

Permalink
Don't print downloading if not downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurav0 authored and sivakumar-kailasam committed Nov 17, 2019
1 parent 4ac6993 commit 4c35c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let specificDocsVersion = argv.version ? argv.version : ''
let ignorePreviouslyIndexedDoc =
projects.length !== 0 && specificDocsVersion !== '' && argv.ignorePreviouslyIndexedDoc
let runClean = !!argv.clean
let noSync = !!argv.noSync
let noSync = !argv.sync

const { apiDocsProcessor } = require('./main.js')
apiDocsProcessor(projects, specificDocsVersion, ignorePreviouslyIndexedDoc, runClean, noSync)
8 changes: 5 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ export async function apiDocsProcessor(
process.exit(1)
})

let docsVersionMsg = specificDocsVersion !== '' ? `. For version ${specificDocsVersion}` : ''
console.log(`Downloading docs for ${projects.join(' & ')}${docsVersionMsg}`)

if (!noSync) {
let docsVersionMsg = specificDocsVersion !== '' ? `. For version ${specificDocsVersion}` : ''
console.log(`Downloading docs for ${projects.join(' & ')}${docsVersionMsg}`)

await downloadExistingDocsToLocal()
let filesToProcess = await fetchYuiDocs(projects, specificDocsVersion, runClean)
await fs.mkdirp('tmp/s3-original-docs')
await RSVP.Promise.all(filesToProcess.map(fixBorkedYuidocFiles))
} else {
console.log('Skipping downloading docs')
}

await readDocs(projects, specificDocsVersion, ignorePreviouslyIndexedDoc, runClean)
Expand Down

0 comments on commit 4c35c37

Please sign in to comment.