Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions etc/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -32,6 +32,8 @@ To generate API documentation for a new major or minor version:

`npm run build:docs -- --tag <version>`

`<version>` 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
Expand Down
4 changes: 3 additions & 1 deletion etc/docs/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"`);
}
Expand All @@ -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();
Expand Down