2020-09-27 15:10:11 +03:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
// [start-readme]
|
|
|
|
//
|
2021-01-20 18:37:42 +03:00
|
|
|
// This script is run automatically via GitHub Actions on every push to `main` to generate searchable data.
|
|
|
|
// It can also be run manually. For more info see [contributing/search.md](contributing/search.md)
|
2020-09-27 15:10:11 +03:00
|
|
|
//
|
|
|
|
// [end-readme]
|
|
|
|
|
|
|
|
require('make-promises-safe')
|
|
|
|
|
|
|
|
main()
|
|
|
|
|
|
|
|
async function main () {
|
2021-05-25 23:44:19 +03:00
|
|
|
const sync = require('./search/sync')
|
2020-09-27 15:10:11 +03:00
|
|
|
const opts = {
|
2020-11-20 18:41:51 +03:00
|
|
|
dryRun: 'DRY_RUN' in process.env,
|
|
|
|
language: process.env.LANGUAGE,
|
|
|
|
version: process.env.VERSION
|
2020-09-27 15:10:11 +03:00
|
|
|
}
|
|
|
|
await sync(opts)
|
|
|
|
}
|