diff --git a/etc/docs/README.md b/etc/docs/README.md index 37e0a574bda..9ba9de7bfba 100644 --- a/etc/docs/README.md +++ b/etc/docs/README.md @@ -14,8 +14,8 @@ necessary to backport a feature). `build.ts` requires the following in addition to dependencies installed with `npm i`: -* Hugo static web generator `v0.30.2` - * You can download the right version [here](https://github.com/gohugoio/hugo/releases/tag/v0.30.2) +* Hugo static web generator `v0.150.0` + * You can download the right version [here](https://github.com/gohugoio/hugo/releases/tag/v0.150.0) * ts-node Note: `typedoc` is also a dependency but it is downloaded by the docs generation script automatically. @@ -32,6 +32,8 @@ To generate API documentation for a new major or minor version: `npm run build:docs -- --tag ` +`` should be formatted MAJOR.MINOR (ex. `--tag=6.8`) + You can optionally specify the following options: - `--yes` if set, this will silence any prompts in the script. useful for running in CI diff --git a/etc/docs/build.ts b/etc/docs/build.ts index 8989fef950f..cf2c61a4ed2 100755 --- a/etc/docs/build.ts +++ b/etc/docs/build.ts @@ -67,7 +67,6 @@ async function updateSiteTemplateForNewVersion( await writeFile(RELEASES_TOML_FILE, stringify(tomlData as any)); await writeFile(RELEASES_JSON_FILE, JSON.stringify(jsonVersions, null, 4)); - // generate the site from the template await exec(`hugo -s template -d ../temp -b "/node-mongodb-native"`); } @@ -80,6 +79,9 @@ async function main() { process.exit(1); } + const { stdout } = await exec('hugo version', { encoding: 'utf8' }); + if (!stdout.includes('0.150.0')) throw new Error('`hugo` version must be 0.150.0.'); + chdir(__dirname); const { tag, status, skipPrompts } = getCommandLineArguments();